Hi, I'm getting an internal compiler error: in find_outermost_region_in_block, at tree-cfg.c:4803 in -fopenmp mode with g++ 4.2.[012]. g++ 4.3 produces no error. Andreas $ /suse/NOBACKUP/gcc/gcc-4.2-branch/bin/g++ -v -save-temps -march=i686 -DSORT_OPTIMAL_PREFETCHING -DUSE_MALLOC_LOCK -DCOUNT_WAIT_TIME -I/home/andreas/work/uka/stxxl/parpipe/include -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -O3 -W -Wall -fopenmp -D__MCSTL__ -I/home/andreas/work/uka/mcstl/libstdc++/c++ -c ICE_find_outermost_region_in_block.cpp Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc-4_2-branch/configure --enable-languages=c,c++ --prefix=/suse/NOBACKUP/gcc/gcc-4.2-branch Thread model: posix gcc version 4.2.2 20070908 (prerelease) /suse/NOBACKUP/gcc/gcc-4.2-branch/libexec/gcc/i686-pc-linux-gnu/4.2.2/cc1plus -E -quiet -v -I/home/andreas/work/uka/stxxl/parpipe/include -I/home/andreas/work/uka/mcstl/libstdc++/c++ -D_GNU_SOURCE -D_REENTRANT -DSORT_OPTIMAL_PREFETCHING -DUSE_MALLOC_LOCK -DCOUNT_WAIT_TIME -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__MCSTL__ ICE_find_outermost_region_in_block.cpp -march=i686 -W -Wall -fopenmp -O3 -fpch-preprocess -o ICE_find_outermost_region_in_block.ii ignoring nonexistent directory "/suse/NOBACKUP/gcc/gcc-4.2-branch/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../i686-pc-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /home/andreas/work/uka/stxxl/parpipe/include /home/andreas/work/uka/mcstl/libstdc++/c++ /suse/NOBACKUP/gcc/gcc-4.2-branch/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2 /suse/NOBACKUP/gcc/gcc-4.2-branch/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/i686-pc-linux-gnu /suse/NOBACKUP/gcc/gcc-4.2-branch/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/backward /usr/local/include /suse/NOBACKUP/gcc/gcc-4.2-branch/include /suse/NOBACKUP/gcc/gcc-4.2-branch/lib/gcc/i686-pc-linux-gnu/4.2.2/include /usr/include End of search list. /suse/NOBACKUP/gcc/gcc-4.2-branch/libexec/gcc/i686-pc-linux-gnu/4.2.2/cc1plus -fpreprocessed ICE_find_outermost_region_in_block.ii -quiet -dumpbase ICE_find_outermost_region_in_block.cpp -march=i686 -auxbase ICE_find_outermost_region_in_block -O3 -W -Wall -version -fopenmp -o ICE_find_outermost_region_in_block.s GNU C++ version 4.2.2 20070908 (prerelease) (i686-pc-linux-gnu) compiled by GNU C version 4.2.2 20070908 (prerelease). GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 7993b3af5142d87e347d8f7153b00978 /home/andreas/work/uka/mcstl/libstdc++/c++/bits/mcstl_par_loop.h: In function ‘Op mcstl::for_each_template_random_access_ed(RandomAccessIterator, RandomAccessIterator, Op, Fu&, Red, Result, Result&, typename std::iterator_traits<_Iterator>::difference_type) [with RandomAccessIterator = stxxl::request_ptr*, Op = stxxl::request_ptr, Fu = mcstl::fill_selector<stxxl::request_ptr*>, Red = mcstl::dummy_reduct, Result = bool]’: /home/andreas/work/uka/mcstl/libstdc++/c++/bits/mcstl_par_loop.h:45: internal compiler error: in find_outermost_region_in_block, at tree-cfg.c:4803
Created attachment 14177 [details] testcase (reduced to be < 500k) Sorry for the delay of the testcase, I had to reduce it from 1.9 MB to 440 KB. (Is there some helper script that can do this in a more or less brute force way? Strip complete namespaces, classes, member functions, ... from the code, recompile and check for a certain error message? Continue it it's still there and backtrack otherwise?) $ /suse/NOBACKUP/gcc/gcc-4.2-branch/bin/g++ -v -march=i686 -O3 -fopenmp -c PR33361.ii Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc-4_2-branch/configure --enable-languages=c,c++ --prefix=/suse/NOBACKUP/gcc/gcc-4.2-branch Thread model: posix gcc version 4.2.2 20070908 (prerelease) /suse/NOBACKUP/gcc/gcc-4.2-branch/libexec/gcc/i686-pc-linux-gnu/4.2.2/cc1plus -fpreprocessed PR33361.ii -quiet -dumpbase PR33361.ii -march=i686 -auxbase PR33361 -O3 -version -fopenmp -o /tmp/ccslyrRU.s GNU C++ version 4.2.2 20070908 (prerelease) (i686-pc-linux-gnu) compiled by GNU C version 4.2.2 20070908 (prerelease). GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 7993b3af5142d87e347d8f7153b00978 PR33361.ii: In function ‘Op mcstl::for_each_template_random_access_ed(RandomAccessIterator, RandomAccessIterator, Op, Fu&, Red, Result, Result&, typename std::iterator_traits<_Iterator>::difference_type) [with RandomAccessIterator = stxxl::request_ptr*, Op = stxxl::request_ptr, Fu = mcstl::fill_selector<stxxl::request_ptr*>, Red = mcstl::dummy_reduct, Result = bool]’: PR33361.ii:3047: internal compiler error: in find_outermost_region_in_block, at tree-cfg.c:4803
Reducing.
There are http://gcc.gnu.org/wiki/HowToPrepareATestcase http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction
Created attachment 14178 [details] reduced testcase
Confirmed.
Created attachment 14216 [details] minimal testcase The ICE only occurs with -O3 and above. $ /suse/NOBACKUP/gcc/gcc-4.2-branch/bin/g++ -v -O3 -fopenmp -c PR33361.min.ii Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc-4_2-branch/configure --enable-languages=c,c++ --prefix=/suse/NOBACKUP/gcc/gcc-4.2-branch Thread model: posix gcc version 4.2.2 20070910 (prerelease) /suse/NOBACKUP/gcc/gcc-4.2-branch/libexec/gcc/i686-pc-linux-gnu/4.2.2/cc1plus -fpreprocessed PR33361.min.ii -quiet -dumpbase PR33361.min.ii -mtune=generic -auxbase PR33361.min -O3 -version -fopenmp -o /tmp/ccdvfpMn.s GNU C++ version 4.2.2 20070910 (prerelease) (i686-pc-linux-gnu) compiled by GNU C version 4.2.2 20070908 (prerelease). GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 4c766e638e42be49e7fc1a3400590598 PR33361.min.ii: In function ‘void f()’: PR33361.min.ii:25: internal compiler error: in find_outermost_region_in_block, at tree-cfg.c:4803
Shorter testcase that crashes already with "-O -fopenmp": ====================================== void foo(); struct A { A() throw() { foo(); } }; void bar() { #pragma omp parallel A a, b; } ======================================
No plans to backport this to 4.2.
*** Bug 33981 has been marked as a duplicate of this bug. ***