brintos

brintos / llvm-project-archived public Read only

0
0
Text · 980 B · 1106ed4 Raw
47 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12module m3  type t14   contains5    procedure, pass(from) :: defAsst16    generic :: assignment(=) => defAsst17  end type8  type t29  end type10  type t311  end type12  interface assignment(=)13    module procedure defAsst214  end interface15 contains16  subroutine defAsst1(to,from)17    class(*), intent(out) :: to18    class(t1), intent(in) :: from19  end20  subroutine defAsst2(to,from)21    class(*), intent(out) :: to22    class(t2), intent(in) :: from23  end24end25 26program test27  use m28  type(t1) x129  type(t2) x230  type(t3) x331  j = x132  j = x233  !ERROR: No intrinsic or user-defined ASSIGNMENT(=) matches operand types INTEGER(4) and TYPE(t3)34  j = x335  x1 = x136  x1 = x237  !ERROR: No intrinsic or user-defined ASSIGNMENT(=) matches operand types TYPE(t1) and TYPE(t3)38  x1 = x339  x2 = x140  x2 = x241  !ERROR: No intrinsic or user-defined ASSIGNMENT(=) matches operand types TYPE(t2) and TYPE(t3)42  x2 = x343  x3 = x144  x3 = x245  x3 = x346end47