PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / proc_decl_3.f90
blob5ee8a9117582757f9d5fc8a40fe1b064cba0d802
1 ! { dg-do compile }
2 ! Some tests for PROCEDURE declarations inside of interfaces.
3 ! Contributed by Janus Weil <jaydub66@gmail.com>
5 module m
7 interface
8 subroutine a()
9 end subroutine a
10 end interface
12 procedure(c) :: f
14 interface bar
15 procedure a,d
16 end interface bar
18 interface foo
19 procedure c
20 end interface foo
22 abstract interface
23 procedure f ! { dg-error "must be in a generic interface" }
24 end interface
26 interface
27 function opfoo(a)
28 integer,intent(in) :: a
29 integer :: opfoo
30 end function opfoo
31 end interface
33 interface operator(.op.)
34 procedure opfoo
35 end interface
37 external ex ! { dg-error "has no explicit interface" }
38 procedure():: ip ! { dg-error "has no explicit interface" }
39 procedure(real):: pip ! { dg-error "has no explicit interface" }
41 interface nn1
42 procedure ex
43 procedure a, a ! { dg-error "already present in the interface" }
44 end interface
46 interface nn2
47 procedure ip
48 end interface
50 interface nn3
51 procedure pip
52 end interface
54 contains
56 subroutine d(x)
58 interface
59 subroutine x()
60 end subroutine x
61 end interface
63 interface gen
64 procedure x
65 end interface
67 end subroutine d
69 function c(x)
70 integer :: x
71 real :: c
72 c = 3.4*x
73 end function c
75 end module m