brintos

brintos / llvm-project-archived public Read only

0
0
Text · 807 B · 28d90a6 Raw
35 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12! Test resolution of type-bound generics.3 4module m15  type :: t6  contains7    procedure, pass(x) :: add1 => add8    procedure, nopass :: add2 => add9    procedure :: add_real10    generic :: g => add1, add2, add_real11  end type12contains13  integer function add(x, y)14    class(t), intent(in) :: x, y15  end16  integer function add_real(x, y)17    class(t), intent(in) :: x18    real, intent(in) :: y19  end20  subroutine test1(x, y, z)21    type(t) :: x22    integer :: y23    integer :: z24    !ERROR: No specific function of generic 'g' matches the actual arguments25    z = x%g(y)26  end27  subroutine test2(x, y, z)28    type(t) :: x29    real :: y30    integer :: z31    !ERROR: No specific function of generic 'g' matches the actual arguments32    z = x%g(x, y)33  end34end35