https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71703
Pierre de Buyl <bugzilla at pdebuyl dot be> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla at pdebuyl dot be --- Comment #8 from Pierre de Buyl <bugzilla at pdebuyl dot be> --- Hello, I don't know if this is related (I am new to bug submission here). Test case: program test_ice implicit none type test_t integer, allocatable :: a(:) end type test_t type(test_t) :: v integer, parameter :: n = 100 allocate(v%a(n)) v%a = 0 end program test_ice compiled with gfortran 5.3.1 and the "-fcheck=mem" flag generates this output test_ice.f90:13:0: v%a = 0 1 internal compiler error: in wide_int_to_tree, at tree.c:1464 0x968950 wide_int_to_tree(tree_node*, generic_wide_int<wide_int_ref_storage<false> > const&) ../../src/gcc/tree.c:1464 0x10a6543 build_int_cst(tree_node*, long) ../../src/gcc/tree.c:1272 0x64e9d3 gfc_trans_assignment_1 ../../src/gcc/fortran/trans-expr.c:9146 0xd48b00 trans_code ../../src/gcc/fortran/trans.c:1711 0xd48b00 gfc_trans_code(gfc_code*) ../../src/gcc/fortran/trans.c:2020 0xd4d522 gfc_generate_function_code(gfc_namespace*) ../../src/gcc/fortran/trans-decl.c:5941 0xd2b045 translate_all_program_units ../../src/gcc/fortran/parse.c:5406 0xd2b045 gfc_parse_file() ../../src/gcc/fortran/parse.c:5603 0x11f8615 gfc_be_parse_file ../../src/gcc/fortran/f95-lang.c:229 Switching to gfortran 4.8.4 or 4.9.2, or removing "-fcheck=all" allows for compilation and execution. Also, adding "(:)" to the member "a" as v%a(:) = 0 also compiles with "-fcheck=all" on gfortran 5.3.1 I found this issue while trying a "-fcheck=all" compilation on a larger codebase and reduced the bug to the example above. Is this of interest here? Anyway, thanks to everyone working on gcc and gfortran! Regards, Pierre