https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96102
Bug ID: 96102 Summary: ICE in check_host_association, at fortran/resolve.c:5994 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- It's an old issue, affects versions down to at least r5 : $ cat z1.f90 module m integer :: n = 2 contains subroutine s if ( n /= 2 ) stop 1 contains integer function n() n = 0 end end end $ gfortran-11-20200705 -c z1.f90 f951: internal compiler error: Segmentation fault 0xbd3bdf crash_signal ../../gcc/toplev.c:328 0x6c515c check_host_association ../../gcc/fortran/resolve.c:5994 0x6c515c gfc_resolve_expr(gfc_expr*) ../../gcc/fortran/resolve.c:7053 0x6c76d7 gfc_resolve_expr(gfc_expr*) ../../gcc/fortran/resolve.c:4410 0x6c76d7 resolve_operator ../../gcc/fortran/resolve.c:3997 0x6c4087 gfc_resolve_expr(gfc_expr*) ../../gcc/fortran/resolve.c:7047 0x6d5ff1 gfc_resolve_expr(gfc_expr*) ../../gcc/fortran/resolve.c:7021 0x6d5ff1 gfc_resolve_blocks(gfc_code*, gfc_namespace*) ../../gcc/fortran/resolve.c:10658 0x6cbc88 gfc_resolve_code(gfc_code*, gfc_namespace*) ../../gcc/fortran/resolve.c:11746 0x6ce517 resolve_codes ../../gcc/fortran/resolve.c:17273 0x6ce44e resolve_codes ../../gcc/fortran/resolve.c:17256 0x6ce5de gfc_resolve(gfc_namespace*) ../../gcc/fortran/resolve.c:17308 0x6b64f2 gfc_parse_file() ../../gcc/fortran/parse.c:6448 0x70284f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212