https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69200
Bug ID: 69200
Summary: ICE on subsequent block statements with module imports
Product: gcc
Version: 5.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: baradi09 at gmail dot com
Target Milestone: ---
Created attachment 37279
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37279&action=edit
Self contained example, file 1
Compiler crashes when in two subsequent identical block-constructs contain the
following statement combination:
* module import via use
* declaring an instance of a derived type defined in the imported module
* calling a type-bound procedure of the derived type instance.
Attached code compiled with
gfortran -c testmod.f90 bug.f90
results in
bug.f90:9:0:
block
1
internal compiler error: in gfc_process_block_locals, at
fortran/trans-decl.c:6106
0x6b8296 gfc_process_block_locals(gfc_namespace*)
../.././gcc/fortran/trans-decl.c:6106
0x6fbce0 gfc_trans_block_construct(gfc_code*)
../.././gcc/fortran/trans-stmt.c:1557
0x69e707 trans_code
../.././gcc/fortran/trans.c:1770
0x6be493 gfc_generate_function_code(gfc_namespace*)
../.././gcc/fortran/trans-decl.c:5851
0x65c5d0 translate_all_program_units
../.././gcc/fortran/parse.c:5343
0x65c5d0 gfc_parse_file()
../.././gcc/fortran/parse.c:5540
0x69ba65 gfc_be_parse_file
../.././gcc/fortran/f95-lang.c:229
Compiler version is 5.3.0.