annotate gcc/testsuite/gfortran.dg/interface_23.f90 @ 132:d34655255c78

update gcc-8.2
author mir3636
date Thu, 25 Oct 2018 10:21:07 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do compile }
kono
parents:
diff changeset
2 !
kono
parents:
diff changeset
3 ! This tests the fix for PR36325, which corrected for the fact that a
kono
parents:
diff changeset
4 ! specific or generic INTERFACE statement implies the EXTERNAL attibute.
kono
parents:
diff changeset
5 !
kono
parents:
diff changeset
6 ! Contributed by Janus Weil <janus@gcc.gnu.org>
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 module a
kono
parents:
diff changeset
9 interface
kono
parents:
diff changeset
10 subroutine foo
kono
parents:
diff changeset
11 end subroutine
kono
parents:
diff changeset
12 end interface
kono
parents:
diff changeset
13 external foo ! { dg-error "Duplicate EXTERNAL attribute" }
kono
parents:
diff changeset
14 end module
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 module b
kono
parents:
diff changeset
17 interface
kono
parents:
diff changeset
18 function sin (x)
kono
parents:
diff changeset
19 real :: sin, x
kono
parents:
diff changeset
20 end function
kono
parents:
diff changeset
21 end interface
kono
parents:
diff changeset
22 intrinsic sin ! { dg-error "EXTERNAL attribute conflicts with INTRINSIC attribute" }
kono
parents:
diff changeset
23 end module
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 ! argument checking was not done for external procedures with explicit interface
kono
parents:
diff changeset
26 program c
kono
parents:
diff changeset
27 interface
kono
parents:
diff changeset
28 subroutine bar(x)
kono
parents:
diff changeset
29 real :: x
kono
parents:
diff changeset
30 end subroutine
kono
parents:
diff changeset
31 end interface
kono
parents:
diff changeset
32 call bar() ! { dg-error "Missing actual argument" }
kono
parents:
diff changeset
33 end program