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

            Bug ID: 106047
           Summary: ICE in structure_alloc_comps, at
                    fortran/trans-array.cc:9574
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Affects versions down to at least r5 :


$ cat z1.f90
program p
   type t
      character(:), allocatable :: c
   end type
   type(t) :: x
   integer :: n = storage_size(x)
end


$ gfortran-13-20220619 -c z1.f90
z1.f90:5:15:

    5 |    type(t) :: x
      |               1
internal compiler error: Segmentation fault
0xcd90df crash_signal
        ../../gcc/toplev.cc:322
0x7c6620 structure_alloc_comps
        ../../gcc/fortran/trans-array.cc:9574
0x7c7348 gfc_nullify_alloc_comp(gfc_symbol*, tree_node*, int, int)
        ../../gcc/fortran/trans-array.cc:10149
0x7c7348 gfc_trans_deferred_array(gfc_symbol*, gfc_wrapped_block*)
        ../../gcc/fortran/trans-array.cc:11206
0x7dabac gfc_trans_deferred_vars(gfc_symbol*, gfc_wrapped_block*)
        ../../gcc/fortran/trans-decl.cc:4994
0x7dd1a5 gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.cc:7756
0x75f53e translate_all_program_units
        ../../gcc/fortran/parse.cc:6669
0x75f53e gfc_parse_file()
        ../../gcc/fortran/parse.cc:6956
0x7acb6f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.cc:229

Reply via email to