[Bug fortran/66911] New: ICE on allocate character with source as a derived type component
pascal22p at parois dot net
gcc-bugzilla@gcc.gnu.org
Fri Jul 17 13:48:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66911
Bug ID: 66911
Summary: ICE on allocate character with source as a derived
type component
Product: gcc
Version: 5.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: pascal22p at parois dot net
Target Milestone: ---
Created attachment 36005
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36005&action=edit
test case
Hi,
gcc 5.1.0 gives an ICE on the test case attached. gcc 4.9.0 compiles it but
gives the wrong answer.
a character is allocated using a character allocatable inside a derived type as
a source.
[]$ gfortran51 -fcheck=all -g f.f90 -o test
f.f90:15:0:
allocate(s, source=environment_table(1)%key)
1
internal compiler error: in gfc_trans_allocate, at fortran/trans-stmt.c:5291
0x6fe2bd gfc_trans_allocate(gfc_code*)
../../gcc/fortran/trans-stmt.c:5291
0x69dc17 trans_code
../../gcc/fortran/trans.c:1820
0x6bd833 gfc_generate_function_code(gfc_namespace*)
../../gcc/fortran/trans-decl.c:5841
0x65bb30 translate_all_program_units
../../gcc/fortran/parse.c:5341
0x65bb30 gfc_parse_file()
../../gcc/fortran/parse.c:5538
0x69afe5 gfc_be_parse_file
../../gcc/fortran/f95-lang.c:228
Please submit a full bug report,
with preprocessed source if appropriate.
Regards,
Pascal
More information about the Gcc-bugs
mailing list