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

--- Comment #5 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
However, this also fails:

program p
  type t
    integer i
  end type
  integer rslt
  class(t), allocatable :: t_alloc(:)
  allocate (t_alloc(10), source=t(1))
  rslt = storage_size(t_alloc)
end program p

$ cat a.f90
program p
  type t
    integer i
  end type
  integer rslt
  class(t), allocatable :: t_alloc(:)
  allocate (t_alloc(10), source=t(1))
  rslt = storage_size(t_alloc)
end program p
$ gfortran a.f90
a.f90:8:0:

    8 |   rslt = storage_size(t_alloc)
      | 
interner Compiler-Fehler: Speicherzugriffsfehler
0xe24dbf crash_signal
        ../../trunk/gcc/toplev.c:326
0x9582fe gfc_conv_intrinsic_storage_size
        ../../trunk/gcc/fortran/trans-intrinsic.c:7683
0x960de1 gfc_conv_intrinsic_function(gfc_se*, gfc_expr*)
        ../../trunk/gcc/fortran/trans-intrinsic.c:10013
0x939b6a gfc_conv_expr(gfc_se*, gfc_expr*)
        ../../trunk/gcc/fortran/trans-expr.c:8315
0x9437c2 gfc_trans_assignment_1
        ../../trunk/gcc/fortran/trans-expr.c:10524
0x8ffcf2 trans_code
        ../../trunk/gcc/fortran/trans.c:1822
0x92c2fb gfc_generate_function_code(gfc_namespace*)
        ../../trunk/gcc/fortran/trans-decl.c:6530
0x8b3eae translate_all_program_units
        ../../trunk/gcc/fortran/parse.c:6134
0x8b3eae gfc_parse_file()
        ../../trunk/gcc/fortran/parse.c:6337
0x8fd06f gfc_be_parse_file
        ../../trunk/gcc/fortran/f95-lang.c:204
Bitte senden Sie einen vollständigen Fehlerbericht auf Englisch ein;
inclusive vorverarbeitetem Quellcode, wenn es dienlich ist.
Please include the complete backtrace with any bug report.

Reply via email to