2011-05-23 Tom de Vries <tom@codesourcery.com>
[official-gcc.git] / gcc / testsuite / gfortran.dg / pure_formal_2.f90
blobb3c8a0e0e2c20a2207af0be55fe8bf58c849035f
1 ! { dg-do compile }
2 ! { dg-options "-std=f2003" }
4 ! PR fortran/47550
5 ! Follow up to: PR fortran/47507
7 ! PURE procedures: Allow arguments w/o INTENT if they are VALUE
10 pure function f(x) ! { dg-error "Fortran 2008: Argument 'x' of pure function" }
11 real, VALUE :: x
12 real :: f
13 f = sin(x)
14 end function f
16 pure subroutine sub(x) ! { dg-error "Fortran 2008: Argument 'x' of pure subroutine" }
17 real, VALUE :: x
18 end subroutine sub