1 ! RUN: %python %S/test_modfile.py %s %flang_fc1
2 ! Check modfile generation for generic interfaces
7 logical, intent(in
) :: y
9 complex function s2(x
,y
)
10 complex, intent(in
) :: x
11 logical, intent(in
) :: y
14 generic
:: operator ( + ) => s1
, s2
15 interface operator ( /= )
16 logical function f1(x
, y
)
18 logical, intent(in
) :: y
22 logical function f2(x
, y
)
23 complex, intent(in
) :: x
24 logical, intent(in
) :: y
26 logical function f3(x
, y
)
27 integer, intent(in
) :: x
28 logical, intent(in
) :: y
31 generic
:: operator(.ne
.) => f2
32 generic
:: operator(<>) => f3
33 private
:: operator( .ne
. )
40 interface operator( .bar
.)
47 logical function s3(x
,y
)
48 logical, intent(in
) :: x
,y
50 integer function s4(x
,y
)
51 integer, intent(in
) :: x
,y
62 ! real(4),intent(in)::x
63 ! logical(4),intent(in)::y
69 ! complex(4),intent(in)::x
70 ! logical(4),intent(in)::y
74 ! interface operator(+)
78 ! interface operator(/=)
83 ! private::operator(/=)
86 ! real(4),intent(in)::x
87 ! logical(4),intent(in)::y
93 ! complex(4),intent(in)::x
94 ! logical(4),intent(in)::y
100 ! integer(4),intent(in)::x
101 ! logical(4),intent(in)::y
111 ! interface operator(.bar.)
119 ! logical(4),intent(in)::x
120 ! logical(4),intent(in)::y
124 ! integer(4),intent(in)::x
125 ! integer(4),intent(in)::y
138 ! use m1,only:operator(+)
143 ! use m1,only:operator(.bar.)
149 use m1
, only
: myfoo
=> foo
150 use m1
, only
: operator(.bar
.)
151 use m1
, only
: operator(.mybar
.) => operator(.bar
.)
152 use m1
, only
: operator(+)
156 ! use m1,only:myfoo=>foo
157 ! use m1,only:operator(.bar.)
158 ! use m1,only:operator(.mybar.)=>operator(.bar.)
159 ! use m1,only:operator(+)
167 complex function foo()
204 ! Test interface nested inside another interface
241 integer function foo()
243 integer function f(x
)
270 ! Compile contents of m4.mod and verify it gets the same thing again.
308 interface operator(<)
309 logical function lt(x
, y
)
310 logical, intent(in
) :: x
, y
316 ! interface operator(<)
321 ! logical(4),intent(in)::x
322 ! logical(4),intent(in)::y
329 use m6a
, only
: operator(.lt
.)
333 ! use m6a,only:operator(.lt.)
348 ! interface g_integer
381 use m7a
, only
: g
=> g_integer
382 use m7b
, only
: g
=> g_real
402 ! use m7a, only: g => g_integer
403 ! use m7b, only: g => g_real
416 ! Test m8 is like m7 but without renaming.
498 ! Merging a use-associated generic with a local generic
552 ! Verify that equivalent names are used when generic operators are merged
555 interface operator(.ne
.)
560 ! interface operator(.ne.)
565 interface operator(<>)
570 ! interface operator(<>)
577 interface operator(/=)
582 ! use m10a,only:operator(.ne.)
583 ! use m10b,only:operator(.ne.)
584 ! interface operator(.ne.)
591 private
:: operator(<>)
595 ! use m10a,only:operator(.ne.)
596 ! use m10c,only:operator(.ne.)
597 ! interface operator(.ne.)
599 ! private::operator(.ne.)