Debian Codegraph @

gcc/testsuite/gfortran.dg/use_rename_14.f90

raw
1 ! { dg-do compile }
2 !
3 ! PR fortran/110993 - bogus diagnostics on renamed interface import
4 !
5 ! Contributed by Rimvydas Jasinskas <rimvydas.jas at gmail.com>
6
7 module m
8 interface
9 subroutine bar(x)
10 use iso_c_binding, only : c_float
11 implicit none
12 real(c_float) :: x(45)
13 end subroutine
14 end interface
15 end
16
17 module m1
18 interface
19 subroutine bar1(x) bind(c)
20 use iso_c_binding, only : c_float
21 implicit none
22 real(c_float) :: x(45)
23 end subroutine
24 end interface
25 end
26
27 module m2
28 interface
29 subroutine bar2(x) bind(c, name="bar2_")
30 use iso_c_binding, only : c_float
31 implicit none
32 real(c_float) :: x(45)
33 end subroutine
34 end interface
35 end
36
37 subroutine foo(y)
38 use m, notthisone => bar
39 use m1, northisone => bar1
40 use m2, orthisone => bar2
41 implicit none
42 real :: y(3)
43 call bar (y)
44 call bar1(y)
45 call bar2(y)
46 end subroutine