gcc/testsuite/gfortran.dg/pure_formal_2.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! { dg-options "-std=f2003" } |
| 3 | ! |
| 4 | ! PR fortran/47550 |
| 5 | ! Follow up to: PR fortran/47507 |
| 6 | ! |
| 7 | ! PURE procedures: Allow arguments w/o INTENT if they are VALUE |
| 8 | ! |
| 9 | |
| 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 |
| 15 | |
| 16 | pure subroutine sub(x) ! { dg-error "Fortran 2008: Argument 'x' of pure subroutine" } |
| 17 | real, VALUE :: x |
| 18 | end subroutine sub |