PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / statement_function_2.f90
blob703ca1716caf87ccf62cfd897ffbadf2e8b00e15
1 ! { dg-do compile }
2 ! PR fortran/54223
3 subroutine r(d)
4 implicit none
5 integer, optional :: d
6 integer :: h, q
7 q(d) = d + 1 ! statement function statement
8 h = q(d)
9 end subroutine r
11 subroutine s(x)
12 implicit none
13 integer, optional :: x
14 integer :: g, z
15 g(x) = x + 1 ! statement function statement
16 z = g() ! { dg-error "Missing actual argument" }
17 end subroutine s
19 subroutine t(a)
20 implicit none
21 integer :: a
22 integer :: f, y
23 f(a) = a + 1 ! statement function statement
24 y = f() ! { dg-error "Missing actual argument" }
25 end subroutine t
26 ! { dg-prune-output " Obsolescent feature" }