OSDN Git Service

2012-01-10 Tobias Burnus <burnus@net-b.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / class_39.f03
1 ! { dg-do compile }
2 !
3 ! PR 47745: [OOP] Segfault with CLASS(*) and derived type dummy arguments
4 !
5 ! Contributed by Rodney Polkinghorne <thisrod@gmail.com>
6
7   type, abstract :: T 
8   end type T
9 contains
10   class(T) function add()  ! { dg-error "must be dummy, allocatable or pointer" }
11     add = 1  ! { dg-error "Variable must not be polymorphic in intrinsic assignment" }
12   end function
13 end