[Bug fortran/82622] [PDT] ICE in structure_alloc_comps, at fortran/trans-array.c:8963
gscfq@t-online.de
gcc-bugzilla@gcc.gnu.org
Wed Oct 25 16:08:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82622
--- Comment #6 from G. Steinmetz <gscfq@t-online.de> ---
(In reply to kargl from comment #5)
> Is this valid code and should compile
It should be legal, IMO. Note that "a" in z1.f90 is effectively unused
(the type parameters need not be used anywhere in the DT).
Side note: deleting attribute len from type t works :
$ cat z3.f90
program p
type t
integer :: n
end type
type t2(b)
integer, len :: b
type(t) :: r(b)
end type
type(t2(:)), allocatable :: x
allocate (t2(3) :: x)
x%r = [t(11), t(22), t(33)]
print *, x%b, size(x%r)
print *, x%r
end
$ gfortran-8-20171022 -static-libgfortran z3.f90
$ a.out
3 3
11 22 33
More information about the Gcc-bugs
mailing list