Debian Codegraph @

gcc/testsuite/gfortran.dg/spec_expr_8.f90

raw
1 ! { dg-do compile }
2 !
3 ! PR fortran/111781
4 ! We used to reject the example below because the dummy procedure g was
5 ! setting the current namespace without properly restoring it, which broke
6 ! the specification expression check for the dimension of A later on.
7 !
8 ! Contributed by Rasmus Vikhamar-Sandberg <[email protected]>
9
10 program example
11 implicit none
12 integer :: n
13
14 contains
15
16 subroutine f(g,A)
17 real, intent(out) :: A(n)
18 interface
19 pure real(8) function g(x)
20 real(8), intent(in) :: x
21 end function
22 end interface
23 end subroutine
24 end program