https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100905
Bug ID: 100905 Summary: [OpenMP] ICE in convert_nonlocal_omp_clauses, at tree-nested.c:1514 with 'omp loop' in Fortran internal procedure Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org Target Milestone: --- Created attachment 50928 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50928&action=edit foo.f90 Long version of the testcase: https://github.com/SOLLVE/sollve_vv/blob/master/tests/5.0/loop/test_loop_order_concurrent.F90 The following testcase works when the '!$omp loop' is in the main program or a separate (module) procedure – but it ICEs when it is an internal procedure: # gfortran foo.f90 -fopenmp internal compiler error: in convert_nonlocal_omp_clauses, at tree-nested.c:1514 0x7118d7 convert_nonlocal_omp_clauses ../../repos/gcc-trunk-commit/gcc/tree-nested.c:1514 0xf455ed convert_nonlocal_reference_stmt ../../repos/gcc-trunk-commit/gcc/tree-nested.c:1708