[to-be-committed] [RISC-V] Use Zbkb for general 64 bit constants when profitable
[official-gcc.git] / gcc / testsuite / gfortran.dg / dummy_procedure_2.f90
blobdd609bd0009d8c8e2549bf284c8145996118b817
1 ! { dg-do compile }
2 ! Checks the fix for the bug exposed in fixing PR25147
4 ! Contributed by Tobias Schlueter <tobi@gcc.gnu.org>
6 module integrator
7 interface
8 function integrate(f,xmin,xmax)
9 implicit none
10 interface
11 function f(x)
12 real(8) :: f,x
13 intent(in) :: x
14 end function f
15 end interface
16 real(8) :: xmin, xmax, integrate
17 end function integrate
18 end interface
19 end module integrator
21 use integrator
22 call foo1 ()
23 call foo2 ()
24 contains
25 subroutine foo1 ()
26 real(8) :: f ! This was not trapped: PR25147/25098
27 print *,integrate (f,0d0,3d0) ! { dg-error "Expected a procedure" }
28 end subroutine foo1
29 subroutine foo2 ()
30 real(8), external :: g ! This would give an error, incorrectly.
31 print *,integrate (g,0d0,3d0)
32 end subroutine foo2
33 end