The attached code ICE's with -fopenmp and -O2, but not with just -fopenmp I build both the recent trunk (svn 110282) and the gomp branch, and it ICE's with both.
/home/perrin/GOMP/INSTALL/110296/bin/gcc -Wall -std=c99 -v --save-temps -O2 -fopenmp -m64 -o test_gomp_2 test_gomp_2.c Using built-in specs. Target: x86_64-unknown-linux-gnu Configured with: /home/perrin/GOMP/gomp-20050608-branch/configure --prefix=/home/perrin/GOMP/INSTALL/110296/ --enable-threads=posix --enable-languages=c,c++,fortran Thread model: posix gcc version 4.2.0-gomp-20050608-branch 20060126 (experimental) (merged 20060126) /home/perrin/GOMP/INSTALL/110296/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.2.0-gomp-20050608-branch/cc1 -E -quiet -v -iprefix /home/perrin/GOMP/INSTALL/110296/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.2.0-gomp-20050608-branch/ -D_REENTRANT test_gomp_2.c -m64 -mtune=generic -std=c99 -Wall -fopenmp -O2 -fpch-preprocess -o test_gomp_2.i ignoring nonexistent directory "/home/perrin/GOMP/INSTALL/110296/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.2.0-gomp-20050608-branch/../../../../x86_64-unknown-linux-gnu/include" ignoring duplicate directory "/home/perrin/GOMP/INSTALL/110296//lib/gcc/x86_64-unknown-linux-gnu/4.2.0-gomp-20050608-branch/include" ignoring nonexistent directory "/home/perrin/GOMP/INSTALL/110296//lib/gcc/x86_64-unknown-linux-gnu/4.2.0-gomp-20050608-branch/../../../../x86_64-unknown-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /home/perrin/GOMP/INSTALL/110296/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.2.0-gomp-20050608-branch/include /usr/local/include /home/perrin/GOMP/INSTALL/110296//include /usr/include End of search list. /home/perrin/GOMP/INSTALL/110296/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.2.0-gomp-20050608-branch/cc1 -fpreprocessed test_gomp_2.i -quiet -dumpbase test_gomp_2.c -m64 -mtune=generic -auxbase test_gomp_2 -O2 -Wall -std=c99 -version -fopenmp -o test_gomp_2.s GNU C version 4.2.0-gomp-20050608-branch 20060126 (experimental) (merged 20060126) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.2.0-gomp-20050608-branch 20060126 (experimental) (merged 20060126). GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Compiler executable checksum: b18775707d7fd6662765314b1efc240e test_gomp_2.c: In function 'main': test_gomp_2.c:121: warning: unused variable 'HH' test_gomp_2.c:120: warning: unused variable 'GG' test_gomp_2.c: In function 'main.omp_fn.1': test_gomp_2.c:223: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. make: *** [test_gomp] Error 1 -- Summary: gomp ICE with -fopenmp and -O2 Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: perrin at msli dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25990