1 ! RUN: %S/test_modfile.sh %s %t %flang_fc1
3 ! Check modfile generation for generic interfaces
8 logical, intent(in
) :: y
10 complex function s2(x
,y
)
11 complex, intent(in
) :: x
12 logical, intent(in
) :: y
15 generic
:: operator ( + ) => s1
, s2
16 interface operator ( /= )
17 logical function f1(x
, y
)
19 logical, intent(in
) :: y
23 logical function f2(x
, y
)
24 complex, intent(in
) :: x
25 logical, intent(in
) :: y
27 logical function f3(x
, y
)
28 integer, intent(in
) :: x
29 logical, intent(in
) :: y
32 generic
:: operator(.ne
.) => f2
33 generic
:: operator(<>) => f3
34 private
:: operator( .ne
. )
41 interface operator( .bar
.)
48 logical function s3(x
,y
)
49 logical, intent(in
) :: x
,y
51 integer function s4(x
,y
)
52 integer, intent(in
) :: x
,y
63 ! real(4),intent(in)::x
64 ! logical(4),intent(in)::y
70 ! complex(4),intent(in)::x
71 ! logical(4),intent(in)::y
75 ! interface operator(+)
79 ! interface operator(/=)
84 ! private::operator(/=)
87 ! real(4),intent(in)::x
88 ! logical(4),intent(in)::y
94 ! complex(4),intent(in)::x
95 ! logical(4),intent(in)::y
101 ! integer(4),intent(in)::x
102 ! logical(4),intent(in)::y
112 ! interface operator(.bar.)
120 ! logical(4),intent(in)::x
121 ! logical(4),intent(in)::y
125 ! integer(4),intent(in)::x
126 ! integer(4),intent(in)::y
139 ! use m1,only:operator(+)
144 ! use m1,only:operator(.bar.)
150 use m1
, only
: myfoo
=> foo
151 use m1
, only
: operator(.bar
.)
152 use m1
, only
: operator(.mybar
.) => operator(.bar
.)
153 use m1
, only
: operator(+)
157 ! use m1,only:myfoo=>foo
158 ! use m1,only:operator(.bar.)
159 ! use m1,only:operator(.mybar.)=>operator(.bar.)
160 ! use m1,only:operator(+)
168 complex function foo()
205 ! Test interface nested inside another interface
242 integer function foo()
244 integer function f(x
)
271 ! Compile contents of m4.mod and verify it gets the same thing again.
309 interface operator(<)
310 logical function lt(x
, y
)
311 logical, intent(in
) :: x
, y
317 ! interface operator(<)
322 ! logical(4),intent(in)::x
323 ! logical(4),intent(in)::y
330 use m6a
, only
: operator(.lt
.)
334 ! use m6a,only:operator(.lt.)
349 ! interface g_integer
382 use m7a
, only
: g
=> g_integer
383 use m7b
, only
: g
=> g_real
403 ! use m7b, only: g => g_real
404 ! use m7a, only: g => g_integer
417 ! Test m8 is like m7 but without renaming.
499 ! Merging a use-associated generic with a local generic
553 ! Verify that equivalent names are used when generic operators are merged
556 interface operator(.ne
.)
561 ! interface operator(.ne.)
566 interface operator(<>)
571 ! interface operator(<>)
578 interface operator(/=)
583 ! use m10b,only:operator(.ne.)
584 ! use m10a,only:operator(.ne.)
585 ! interface operator(.ne.)
592 private
:: operator(<>)
596 ! use m10c,only:operator(.ne.)
597 ! use m10a,only:operator(.ne.)
598 ! interface operator(.ne.)
600 ! private::operator(.ne.)