Debian Codegraph @

gcc/testsuite/gfortran.dg/use_17.f90

raw
1 ! { dg-do compile }
2 !
3 ! PR fortran/51578
4 !
5 ! Contributed by Billy Backer
6 !
7 ! Check that indict importing of the symbol "axx" works
8 ! even if renaming prevent the direct import.
9 !
10 module mod1
11 integer :: axx=2
12 end module mod1
13
14 module mod2
15 use mod1
16 end module mod2
17
18 subroutine sub1
19 use mod1, oxx=>axx
20 use mod2
21 implicit none
22 print*,axx ! Valid - was working before
23 end subroutine sub1
24
25 subroutine sub2
26 use mod2
27 use mod1, oxx=>axx
28 implicit none
29 print*,axx ! Valid - was failing before
30 end subroutine sub2
31
32 subroutine test1
33 use :: iso_c_binding
34 use, intrinsic :: iso_c_binding, only: c_double_orig => c_double
35 integer :: c_double
36 integer, parameter :: p1 = c_int, p2 = c_double_orig
37 end subroutine test1