[Bug fortran/103507] New: ICE in resolve_block_construct, at fortran/resolve.c:10787

gscfq@t-online.de gcc-bugzilla@gcc.gnu.org
Tue Nov 30 18:50:51 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103507

            Bug ID: 103507
           Summary: ICE in resolve_block_construct, at
                    fortran/resolve.c:10787
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Seems to have started with r6 :


$ cat z1.f90
subroutine s
block
end if
end
program p
end


$ cat z2.f90
subroutine s
block
end do
end
program p
end


$ cat z4.f90
subroutine s(x)
block
end if
end
end


$ cat z5.f90
subroutine s(x)
block
end subroutine
end
end


$ gfortran-12-20211128 -c z1.f90
z1.f90:3:3:

    3 | end if
      |   1
Error: Expecting END BLOCK statement at (1)
z1.f90:5:9:

    5 | program p
      |         1
Error: Unexpected PROGRAM statement at (1)
f951: internal compiler error: Segmentation fault
0xf0942f crash_signal
        ../../gcc/toplev.c:322
0x853098 gfc_resolve(gfc_namespace*)
        ../../gcc/fortran/resolve.c:17556
0x853098 resolve_block_construct
        ../../gcc/fortran/resolve.c:10787
0x853098 gfc_resolve_code(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.c:12182
0x854f97 resolve_codes
        ../../gcc/fortran/resolve.c:17536
0x85505e gfc_resolve(gfc_namespace*)
        ../../gcc/fortran/resolve.c:17571
0x83d314 resolve_all_program_units
        ../../gcc/fortran/parse.c:6573
0x83d314 gfc_parse_file()
        ../../gcc/fortran/parse.c:6829
0x88b37f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:216


More information about the Gcc-bugs mailing list