diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/result_1.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/result_1.f90 | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/result_1.f90 b/gcc/testsuite/gfortran.dg/result_1.f90 new file mode 100644 index 00000000000..162ffaf5857 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/result_1.f90 @@ -0,0 +1,18 @@ +! { dg-do compile } +! +! PR 36704: Procedure pointer as function result +! +! Contributed by Janus Weil <janus@gcc.gnu.org> + +function f() result(r) +real, parameter :: r = 5.0 ! { dg-error "attribute conflicts" } +end function + +function g() result(s) +real :: a,b,c +namelist /s/ a,b,c ! { dg-error "attribute conflicts" } +end function + +function h() result(t) +type t ! { dg-error "attribute conflicts" } +end function |