33 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12 3! If there are 2 or more use-associated symbols4! from different modules with the same name,5! the error should be generated only if6! the name is actually used.7module a8 contains9 function foo()10 foo = 4211 end function foo12end module a13 14module b15 contains16 function foo()17 foo = 4218 end function foo19end module b20 21subroutine without_error22 use a23 use b24end subroutine without_error25 26subroutine with_error27 use a28 use b29 integer :: res30 ! ERROR: Reference to 'foo' is ambiguous31 res = foo()32end subroutine with_error33