this test case (with an invalid collapse): SUBROUTINE init_input_type() INTEGER :: k,l(3),u(3) !$omp parallel do shared(l,u) collapse(3) DO k = l(3),u(3) ENDDO END SUBROUTINE
leads to an ice with current trunk as: #0 gfc_resolve_omp_directive (code=0x1437880, ns=<value optimized out>) at /data03/vondele/gcc_trunk/gcc/gcc/fortran/openmp.c:1519 #1 0x000000000051f74c in resolve_code (code=0x1437880, ns=0x1435f00) at /data03/vondele/gcc_trunk/gcc/gcc/fortran/resolve.c:9126 #2 0x000000000052063a in resolve_codes (ns=0x1435f00) at /data03/vondele/gcc_trunk/gcc/gcc/fortran/resolve.c:13339 #3 0x000000000052074c in gfc_resolve (ns=0x1435f00) at /data03/vondele/gcc_trunk/gcc/gcc/fortran/resolve.c:13366 #4 0x0000000000513cd7 in gfc_parse_file () at /data03/vondele/gcc_trunk/gcc/gcc/fortran/parse.c:4194 #5 0x000000000054ce7d in gfc_be_parse_file (set_yydebug=<value optimized out>) at /data03/vondele/gcc_trunk/gcc/gcc/fortran/f95-lang.c:242 #6 0x000000000085fa4d in toplev_main (argc=20, argv=0x7fff13674938) at /data03/vondele/gcc_trunk/gcc/gcc/toplev.c:972 #7 0x00007ffdb4e7d436 in __libc_start_main () from /lib64/libc.so.6 #8 0x00000000004aa599 in _start () -- Summary: segfault on omp collapse Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jv244 at cam dot ac dot uk http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45595