This is GCC Bugzilla
This is GCC Bugzilla Version 2.20+
View Bug Activity | Format For Printing | Clone This Bug
This is with both 4.2 and 4.3 on x86_64/Linux. gfortran-4.3 -fopenmp a.f90 a.f90: In function 'MAIN__': a.f90:3: internal compiler error: in extract_omp_for_data, at omp-low.c:162 Test case (by Xavier Andrade): -------------------------- program testbug integer :: ii !$omp parallel do do ii = 1, 1000 end do contains subroutine something() ii = 0 end subroutine something end program testbug --------------------------
/* PR middle-end/33880 */ /* { dg-do compile } */ /* { dg-options "-O2 -fopenmp" } */ int foo (void) { int i = 0; void bar (void) { i++; } bar (); #pragma omp parallel for for (i = 0; i < 10; i++) ; i = 3; bar (); return i; } ICEs the same way.
Confirmed. Another nested function with openmp interaction case.
Jakub, is there any chance that it can still get fixed for 4.3.0?
Yes. Have a fix, now need to write some more testcases.
Subject: Bug 33880 Author: jakub Date: Fri Jan 25 12:54:42 2008 New Revision: 131825 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131825 Log: PR middle-end/33880 * tree-nested.c (walk_omp_for): New function. (convert_nonlocal_reference, convert_local_reference): Call walk_omp_for on OMP_FOR. (convert_call_expr): Call walk_body on OMP_FOR's OMP_FOR_PRE_INIT_BODY. * testsuite/libgomp.c/pr33880.c: New test. * testsuite/libgomp.fortran/pr33880.f90: New test. Added: trunk/libgomp/testsuite/libgomp.c/pr33880.c trunk/libgomp/testsuite/libgomp.fortran/pr33880.f90 Modified: trunk/gcc/ChangeLog trunk/gcc/tree-nested.c trunk/libgomp/ChangeLog
Fixed.
*** Bug 35108 has been marked as a duplicate of this bug. ***