2014-07-12 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / result_1.f90
blob96d2a1febe5704d4a4dd26ab09afe41dd43b025a
1 ! { dg-do compile }
3 ! PR 36704: Procedure pointer as function result
5 ! Contributed by Janus Weil <janus@gcc.gnu.org>
7 function f() result(r)
8 real, parameter :: r = 5.0 ! { dg-error "attribute conflicts" }
9 end function
11 function g() result(s)
12 real :: a,b,c
13 namelist /s/ a,b,c ! { dg-error "attribute conflicts" }
14 end function
16 function h() result(t)
17 type t ! { dg-error "GENERIC attribute conflicts with RESULT attribute" }
18 end type t ! { dg-error "Expecting END FUNCTION statement" }
19 end function
21 function i() result(t)
22 type t ! { dg-error "GENERIC attribute conflicts with RESULT attribute" }
23 end function