ieee_9.f90: XFAIL on arm*-*-gnueabi[hf].
[official-gcc.git] / gcc / testsuite / gfortran.dg / host_assoc_function_9.f90
blob8447109012ec314110082cc80d5a123b601773a5
1 ! { dg-do run }
2 ! Tests the fix for the bug PR40629, in which the reference to 'x'
3 ! in 'upper' wrongly host-associated with the symbol 'x' at module
4 ! leve rather than the function.
6 ! Contributed by Philippe Marguinaud <philippe.marguinaud@meteo.fr>
8 MODULE m
9 REAL :: x = 0
10 CONTAINS
11 subroutine s
12 call upper
13 call lower
14 CONTAINS
15 SUBROUTINE upper
16 y = x(3,1)
17 if (int(y) .ne. 3) STOP 1
18 END SUBROUTINE
19 FUNCTION x(n, m)
20 x = m*n
21 END FUNCTION
22 SUBROUTINE lower
23 y = x(2,1)
24 if (int(y) .ne. 2) STOP 2
25 END SUBROUTINE
26 END SUBROUTINE
27 END MODULE
29 use m
30 call s
31 end