1 ! RUN: %python %S/test_errors.py %s %flang_fc1
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
193 !ERROR: Cannot use-associate generic interface 'g' with specific procedure of the same name when another such generic is in scope
197 !ERROR: USE-associated generic 'g' may not have specific procedures 'g' and 'g' as their interfaces are not distinguishable
199 !ERROR: Cannot use-associate generic interface 'g' with specific procedure of the same name when another such generic is in scope
215 !ERROR: Generic 'g' may not have specific procedures 's' and 's' as their interfaces are not distinguishable
240 !ERROR: Generic interface 'g' has ambiguous derived types from modules 'm11a' and 'm11b'
262 use m12b
, only
: gc
=> gb
265 use m12a
, only
: g
=> ga
266 use m12c
, only
: g
=> gc
279 module procedure subr
310 real, intent(in
) :: x
351 !ERROR: Cannot use-associate 'foo'; it is already declared in this scope
367 !ERROR: Reference to 'foo' is ambiguous