Overview ========= When compiling the simple file which is attached to this report, I get the following message suggesting that I report it here: compiler_error.cc:18: internal compiler error: in lower_regimplify, at omp-low.c:4251 Steps to reproduce ==================== Compile the attached file compiler_error.cc: g++-4.2.1 -c -Wall -fopenmp -save-temps -o compiler_error.o compiler_error.cc Build Date & Platform ===================== Red Hat Enterprise Linux AS release 4 (Nahant Update 5) Linux 2.6.19.2 #8 SMP Mon Jun 25 2007 x86_64 GNU/Linux gcc was configured with: .../gcc-4.2.1/configure --prefix=.../gcc-4.2.1 --program-suffix=-4.2.1 --enable-threads --enable-languages=c++,fortran The bug shows up both with the RedHat gcc version AND the "official" version. The bug does not occur when I compile the source using the portland compiler, for example. Additional Information ====================== 1. When I remove the try...catch statement, the problem is gone. 2. When I do not loop up to the class variable A::x but a constant (say, 1000), the problem is gone.
Created attachment 14169 [details] Source code which fails to compile
Created attachment 14170 [details] Preprocessed file
Confirmed. Shorter testcase (just compile with "-fopenmp"): ================================== struct A { int n; void foo(); }; void A::foo() { try { #pragma omp parallel for for (int i = 0; i < n; ++i) ; } catch(...) {} } ==================================
Subject: Bug 33333 Author: jakub Date: Fri Jan 25 09:12:57 2008 New Revision: 131820 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131820 Log: PR middle-end/33333 * gimplify.c (gimplify_omp_for): Gimplify OMP_FOR_PRE_BODY. * g++.dg/gomp/pr33333.C: New test. Added: trunk/gcc/testsuite/g++.dg/gomp/pr33333.C Modified: trunk/gcc/ChangeLog trunk/gcc/gimplify.c trunk/gcc/testsuite/ChangeLog
Fixed on the trunk.