https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108434
Paul Thomas <pault at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pault at gcc dot gnu.org
--- Comment #10 from Paul Thomas <pault at gcc dot gnu.org> ---
Created attachment 59454
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59454&action=edit
Potential fix for comment 1
Hi Harald,
I came across this PR while checking my own regressions. The attachment fixes
the wrinkle in comment 1 and regtests OK.
program p
type c
integer :: i
end type
type t
class(c), allocatable :: a(2)
end type
type s
class(d), allocatable :: a(2)
end type
class(t), pointer :: y1
class(t), allocatable :: x1
class(s), pointer :: y2
class(s), allocatable :: x2
end
returns:
pr108434.f90:6:35:
6 | class(c), allocatable :: a(2)
| 1
Error: Allocatable component of structure at (1) must have a deferred shape
pr108434.f90:9:35:
9 | class(d), allocatable :: a(2)
| 1
Error: Allocatable component of structure at (1) must have a deferred shape
pr108434.f90:9:14:
9 | class(d), allocatable :: a(2)
| 1
Error: Derived type ādā at (1) has not been declared
I am not sure that the chunk in resolve.cc is needed any more but it doesn't do
any harm!
I hope that this helps
Paul