Debian Codegraph @

gcc/testsuite/gfortran.dg/pr85877.f90

raw
1 ! { dg-do compile }
2 ! PR fortran/85877
3 ! A procedure with the bind(c) attribute shall have an explicit interface
4 ! Contributed by G. Steinmetz
5
6 function f() bind(c)
7 f = 42.
8 end
9
10 subroutine p
11 bind(c) f ! { dg-error "must be explicit" }
12 x = f()
13 end
14
15 function g() bind(c)
16 g = 42.
17 end
18
19 subroutine s
20 interface
21 function g() bind(c)
22 end function g
23 end interface
24 x = g()
25 end