1! RUN: %python %S/test_errors.py %s %flang_fc1 2 3! If there are 2 or more use-associated symbols 4! from different modules with the same name, 5! the error should be generated only if 6! the name is actually used. 7module a 8 contains 9 function foo() 10 foo = 42 11 end function foo 12end module a 13 14module b 15 contains 16 function foo() 17 foo = 42 18 end function foo 19end module b 20 21subroutine without_error 22 use a 23 use b 24end subroutine without_error 25 26subroutine with_error 27 use a 28 use b 29 integer :: res 30 ! ERROR: Reference to 'foo' is ambiguous 31 res = foo() 32end subroutine with_error 33