Projet_SETI_RISC-V/riscv-gnu-toolchain/gcc/gcc/testsuite/gfortran.dg/extends_type_of_4.f90

21 lines
486 B
Fortran

! { 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