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

            Bug ID: 82970
           Summary: ICE in vptr_field_get, at fortran/trans-expr.c:264
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Wrapping source "x" :


$ cat z1.f90
program p
   type t
   end type
   class(t), allocatable :: x(:)[:]
   class(t), allocatable :: z(:)
   allocate (x(2)[*])
   allocate (z, source=(x))
end


$ cat z2.f90
program p
   type t
   end type
   class(t), allocatable :: x(:)[:]
   class(t), allocatable :: z(:)
   allocate (x(2)[*])
   allocate (z, mold=(x))
end


$ gfortran-8-20171112 -c z1.f90 -fcoarray=single
z1.f90:7:0:

    allocate (z, source=(x))

internal compiler error: Segmentation fault
0xb61c7f crash_signal
        ../../gcc/toplev.c:325
0x75b91f vptr_field_get
        ../../gcc/fortran/trans-expr.c:264
0x75c71d gfc_vptr_size_get(tree_node*)
        ../../gcc/fortran/trans-expr.c:325
0x79f9fb gfc_trans_allocate(gfc_code*)
        ../../gcc/fortran/trans-stmt.c:5842
0x731ce7 trans_code
        ../../gcc/fortran/trans.c:1980
0x75897c gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6421
0x6ea920 translate_all_program_units
        ../../gcc/fortran/parse.c:6091
0x6ea920 gfc_parse_file()
        ../../gcc/fortran/parse.c:6294
0x72f13f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:204

Reply via email to