xref: /llvm-project/flang/test/Semantics/generic11.f90 (revision b2c363e2616dc6ac6ee76c223d84ec512e118d5d)
1! RUN: %python %S/test_errors.py %s %flang_fc1
2! Regression test for bug #119151
3interface sub
4  subroutine sub1(ifun)
5    interface
6      integer function ifun()
7      end
8     end interface
9   end
10   subroutine sub2(rfun)
11     real rfun
12     external rfun
13   end
14end interface
15integer ifun
16real rfun
17complex zfun
18external ifun, rfun, zfun, xfun
19call sub(ifun)
20call sub(rfun)
21!ERROR: No specific subroutine of generic 'sub' matches the actual arguments
22call sub(zfun)
23!ERROR: The actual arguments to the generic procedure 'sub' matched multiple specific procedures, perhaps due to use of NULL() without MOLD= or an actual procedure with an implicit interface
24call sub(xfun)
25end
26