RISC-V: Regenerate opt urls.
[official-gcc.git] / gcc / testsuite / gfortran.dg / class_20.f03
blob1428102e9ffc1b16a39d2f825ca365317b1d8623
1 ! { dg-do compile }
3 ! PR 44044: [OOP] SELECT TYPE with class-valued function
4 ! comment #1
6 ! Note: All three error messages are being checked for double occurrence,
7 !       using the trick from PR 30612.
9 ! Contributed by Janus Weil <janus@gcc.gnu.org>
12 implicit none
14 type :: t
15 end type
17 type :: s
18   sequence
19 end type
21 contains
23   function fun()  ! { dg-bogus "must be dummy, allocatable or pointer.*must be dummy, allocatable or pointer" }
24     class(t) :: fun
25   end function
27   function fun2()  ! { dg-bogus "cannot have a deferred shape.*cannot have a deferred shape" }
28     integer,dimension(:) :: fun2
29   end function
31   function fun3() result(res)  ! { dg-bogus "is not extensible.*is not extensible" }
32     class(s),pointer :: res
33   end function
35 end
38 ! { dg-error "must be dummy, allocatable or pointer" "" { target *-*-* } 23 }
39 ! { dg-error "cannot have a deferred shape"          "" { target *-*-* } 27 }
40 ! { dg-error "is not extensible"                     "" { target *-*-* } 31 }