summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/extends_type_of_4.f90
blob: 6437332238734a2b5ce4eb016da7b2099ab63202 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
! { dg-do compile }
! PR fortran/106121 - ICE in gfc_simplify_extends_type_of
! Contributed by G.Steinmetz

program p
   type t
   end type
   type(t)  :: x
   class(t) :: y               ! { dg-error "dummy, allocatable or pointer" }
   print *, extends_type_of (x, y)
end

subroutine s
   type t
      integer :: i
   end type
   type(t)  :: x
   class(t) :: y               ! { dg-error "dummy, allocatable or pointer" }
   stop extends_type_of (x, y) ! { dg-error "STOP code" }
end