re PR fortran/78741 (ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1534)
[official-gcc.git] / gcc / testsuite / gfortran.dg / class_39.f03
blobc29a3b06a63ad032d52d003e000975c9ab38b6ab
1 ! { dg-do compile }
3 ! PR 47745: [OOP] Segfault with CLASS(*) and derived type dummy arguments
5 ! Contributed by Rodney Polkinghorne <thisrod@gmail.com>
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 "Nonallocatable variable must not be polymorphic in intrinsic assignment" }
12   end function
13 end