2017-12-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gfortran.dg / unlimited_polymorphic_9.f90
blob5b7fe92e9ee02326ce064b67c62214d4d0342374
1 ! { dg-do compile }
3 ! PR 57639: [OOP] ICE with polymorphism (and illegal code)
5 ! Contributed by Walter Spector <w6ws@earthlink.net>
7 implicit none
9 class(*) :: t1, t2 ! { dg-error "must be dummy, allocatable or pointer" }
11 print *, 'main: compare = ', compare (t1, t2)
12 print *, SAME_TYPE_AS (t1, t2)
14 contains
16 logical function compare (a, b)
17 class(*), intent(in), allocatable :: a, b
18 end function
20 end