aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/class_60.f90
blob: f51c48349c331e5cb49d9da78f2e9f24ddfdb7da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
! { dg-do compile }
!
! PR 66366: [OOP] ICE on invalid with non-allocatable CLASS variable
!
! Contributed by Andrew Benson <abensonca@gmail.com>

module bug

  type :: t1d
   contains
     procedure :: interpolate => interp
  end type t1d

  type :: tff
     class(t1d) :: transfer  ! { dg-error "must be allocatable or pointer" }
  end type tff

contains

  double precision function interp(self)
    implicit none
    class(t1d), intent(inout) :: self
    return
  end function interp

  double precision function fvb(self)
    implicit none
    class(tff), intent(inout) :: self
    fvb=self%transfer%interpolate()  ! { dg-error "is not a member of" }
    return
  end function fvb

end module bug