Debian Codegraph @

gcc/testsuite/gfortran.dg/class_39.f03

raw
1 ! { dg-do compile }
2 !
3 ! PR 47745: [OOP] Segfault with CLASS(*) and derived type dummy arguments
4 !
5 ! Contributed by Rodney Polkinghorne <[email protected]>
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 "Nonallocatable variable must not be polymorphic in intrinsic assignment" }
12 end function
13 end