https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62536
Bug ID: 62536
Summary: ICE (segfault) for invalid END BLOCK statement
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Keywords: error-recovery, ice-on-invalid-code
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: burnus at gcc dot gnu.org
Error recovery issue (ICE segfault). Found via PR62309
Error: Syntax error in END BLOCK statement at (1)
test.f90:10.11:
end block
1
Error: Expected block name of 'p��' in END BLOCK statement at (1)
test.f90:12.3:
endfunction
1
Error: Expecting END BLOCK statement at (1)
f951: internal compiler error: Segmentation fault
0xad62af crash_signal
../../gcc/toplev.c:339
0x6372db reject_statement
../../gcc/fortran/parse.c:2042
0x6395d6 decode_statement
../../gcc/fortran/parse.c:555
0x63a6a9 next_free
../../gcc/fortran/parse.c:926
0x63a6a9 next_statement
../../gcc/fortran/parse.c:1121
0x63c6ac parse_executable
../../gcc/fortran/parse.c:4361
0x63d056 parse_progunit
../../gcc/fortran/parse.c:4591
0x63c724 parse_block_construct
../../gcc/fortran/parse.c:3681
function f2 (x)
implicit none
integer f2, x
block
block named
integer a ! should be SAVEd
a = a + x ! should increment by y every time
f2 = a
end block named
end block
return
endfunction