| 1 |
! { dg-do compile } |
| 2 |
! |
| 3 |
! PR 66366: [OOP] ICE on invalid with non-allocatable CLASS variable |
| 4 |
! |
| 5 |
! Contributed by Andrew Benson <[email protected]> |
| 6 |
|
| 7 |
module bug |
| 8 |
|
| 9 |
type :: t1d |
| 10 |
contains |
| 11 |
procedure :: interpolate => interp |
| 12 |
end type t1d |
| 13 |
|
| 14 |
type :: tff |
| 15 |
class(t1d) :: transfer ! { dg-error "must be allocatable or pointer" } |
| 16 |
end type tff |
| 17 |
|
| 18 |
contains |
| 19 |
|
| 20 |
double precision function interp(self) |
| 21 |
implicit none |
| 22 |
class(t1d), intent(inout) :: self |
| 23 |
return |
| 24 |
end function interp |
| 25 |
|
| 26 |
double precision function fvb(self) |
| 27 |
implicit none |
| 28 |
class(tff), intent(inout) :: self |
| 29 |
fvb=self%transfer%interpolate() ! { dg-error "is not a member of" } |
| 30 |
return |
| 31 |
end function fvb |
| 32 |
|
| 33 |
end module bug |