1 ! RUN: %python %S/test_errors.py %s %flang_fc1 -pedantic
4 !Note: PGI, Intel, and GNU allow this; NAG and Sun do not
5 !ERROR: 'foo' is already declared in this scoping unit
14 !WARNING: 's' should not be the name of both a generic interface and a procedure unless it is a specific procedure of the generic
20 ! This is okay: s is generic and specific
50 ! Generic g should merge the two use-associated ones
74 ! Generic g should merge the two use-associated ones
99 !ERROR: Generic 'g' may not have specific procedures 'sa' and 'sb' as their interfaces are not distinguishable
125 subroutine s3(x
, y
, z
)
128 ! Merge the three use-associated generics
135 call g(1.0, 2.0, 3.0)
157 ! If merged generic conflicts with another USE, it is an error (if it is referenced)
162 !ERROR: Reference to 'g' is ambiguous
183 !PORTABILITY: USE-associated generic 'g' should not have specific procedures 'g' and 'g' as their interfaces are not distinguishable
200 !ERROR: Generic 'g' may not have specific procedures 's' and 's' as their interfaces are not distinguishable
229 use m12b
, only
: gc
=> gb
232 use m12a
, only
: g
=> ga
233 use m12c
, only
: g
=> gc
246 module procedure subr
277 real, intent(in
) :: x
318 !ERROR: Cannot use-associate 'foo'; it is already declared in this scope
334 !ERROR: Reference to 'foo' is ambiguous