Hi, I have obtained an ICE in expand_expr_real_1, at expr.c:6814 when trying to build my code using OpenMP. I am using gcc version "4.2.0 20060422 (experimental)" on target x86_64-unknown-linux-gnu.
The problem appears also in the FC5 gcc4.1.0 version "gcc (GCC) 4.1.0 20060304 (Red Hat 4.1.0-3)". Below you find to pieces of code which produce the problem, as well as the output of gcc -v -save-temps. The ICE disapears when removing all openmp directives and headerfiles. The ICE disapears also when the function is a void instead of T1, and also if T1 is a normal 'old' type. If you need more info, just contact me. With kind regards, Klaas <BEGIN code.cpp> #include "t1.h" #include <omp.h> T1 function (void) { int ii,N; T1 temp(N); #pragma omp parallel for for (ii = 0; ii < N; ii++) { temp(ii,ii) = ii; } return temp; } <END code.cpp> <BEGIN t1.h> #ifndef LINALG_H #define T1_H class T1 { public : T1(int); ~T1(void); double &operator()(int, int) const; private : double *a; }; #endif <END t1.h> [EMAIL PROTECTED] src]$ /usr/local/gcc4.2/bin/x86_64-unknown-linux-gnu-g++ -v -save-temps -fopenmp -c code.cpp Using built-in specs. Target: x86_64-unknown-linux-gnu Configured with: /usr/local/src/gcc-4.2-20060422/configure --prefix=/usr/local/gcc4.2 --enable-languages=c,c++ Thread model: posix gcc version 4.2.0 20060422 (experimental) /usr/local/gcc4.2/libexec/gcc/x86_64-unknown-linux-gnu/4.2.0/cc1plus -E -quiet -v -D_GNU_SOURCE -D_REENTRANT code.cpp -mtune=generic -fopenmp -fpch-preprocess -o code.ii ignoring nonexistent directory "/usr/local/gcc4.2/lib/gcc/x86_64-unknown-linux-gnu/4.2.0/../../../../x86_64-unknown-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /usr/local/gcc4.2/lib/gcc/x86_64-unknown-linux-gnu/4.2.0/../../../../include/c++/4.2.0 /usr/local/gcc4.2/lib/gcc/x86_64-unknown-linux-gnu/4.2.0/../../../../include/c++/4.2.0/x86_64-unknown-linux-gnu /usr/local/gcc4.2/lib/gcc/x86_64-unknown-linux-gnu/4.2.0/../../../../include/c++/4.2.0/backward /usr/local/include /usr/local/gcc4.2/include /usr/local/gcc4.2/lib/gcc/x86_64-unknown-linux-gnu/4.2.0/include /usr/include End of search list. /usr/local/gcc4.2/libexec/gcc/x86_64-unknown-linux-gnu/4.2.0/cc1plus -fpreprocessed code.ii -quiet -dumpbase code.cpp -mtune=generic -auxbase code -version -fopenmp -o code.s GNU C++ version 4.2.0 20060422 (experimental) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.2.0 20060422 (experimental). GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Compiler executable checksum: 99a2733c59c8f6d329de89f75af46282 code.cpp: In function âT1 function()â: code.cpp:6: internal compiler error: in expand_expr_real_1, at expr.c:6814 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions -- Summary: OpenMP ICE in expand_expr_real_1 at expr.c:6814 Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgomp AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: Klaas dot Vantournhout at UGent dot be http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27337