------- Comment #1 from burnus at gcc dot gnu dot org 2007-06-16 07:05 ------- Work around for Fortran: - integer :: i, tmp = 1, itmp = 0 + integer :: i, tmp, itmp + tmp = 1; itmp = 0
Reduced C test case below. The problem is that itmp and tmp are static. #include <omp.h> int main() { int nthreads[4]; static int tmp, itmp; omp_set_num_threads (4); #pragma omp parallel private(itmp) { itmp = omp_get_thread_num (); #pragma omp parallel firstprivate(tmp) { tmp = (omp_get_thread_num () + tmp) + 1; } } } -- burnus at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Component|fortran |middle-end Ever Confirmed|0 |1 GCC build triplet|x86_64-suse-linux | GCC host triplet|x86_64-suse-linux | GCC target triplet|x86_64-suse-linux | Keywords| |ice-on-valid-code Known to fail| |4.2.0 4.3.0 Last reconfirmed|0000-00-00 00:00:00 |2007-06-16 07:05:39 date| | Summary|ICE - gfortran in |ICE: in |lookup_decl_in_outer_ctx, at|lookup_decl_in_outer_ctx, at |omp-low.c:1508 |omp-low.c:1508 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32362