PR c/29467
[official-gcc.git] / gcc / testsuite / gfortran.dg / interface_23.f90
blobb2e7a697fd227ebf79a87ef0519621151a8b4bb6
1 ! { dg-do compile }
3 ! This tests the fix for PR36325, which corrected for the fact that a
4 ! specific or generic INTERFACE statement implies the EXTERNAL attibute.
6 ! Contributed by Janus Weil <janus@gcc.gnu.org>
8 module a
9 interface
10 subroutine foo
11 end subroutine
12 end interface
13 external foo ! { dg-error "Duplicate EXTERNAL attribute" }
14 end module
16 module b
17 interface
18 function sin (x)
19 real :: sin, x
20 end function
21 end interface
22 intrinsic sin ! { dg-error "EXTERNAL attribute conflicts with INTRINSIC attribute" }
23 end module
25 ! argument checking was not done for external procedures with explicit interface
26 program c
27 interface
28 subroutine bar(x)
29 real :: x
30 end subroutine
31 end interface
32 call bar() ! { dg-error "Missing actual argument" }
33 end program