1! { dg-do compile } 2! 3! PR 36704: Procedure pointer as function result 4! 5! Contributed by Janus Weil <janus@gcc.gnu.org> 6 7function f() result(r) 8real, parameter :: r = 5.0 ! { dg-error "attribute conflicts" } 9end function 10 11function g() result(s) 12real :: a,b,c 13namelist /s/ a,b,c ! { dg-error "attribute conflicts" } 14end function 15 16function h() result(t) 17type t ! { dg-error "GENERIC attribute conflicts with RESULT attribute" } 18end type t ! { dg-error "Expecting END FUNCTION statement" } 19end function 20 21function i() result(t) 22type t ! { dg-error "GENERIC attribute conflicts with RESULT attribute" } 23end function 24