brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.2 KiB · 4a7595b Raw
96 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12module m3  interface operator(-)4    !ERROR: OPERATOR(-) function 'f1' conflicts with intrinsic operator5    function f1(x)6      real, intent(in) :: x7    end8    !ERROR: OPERATOR(-) function 'f2' conflicts with intrinsic operator9    attributes(device) function f2(x)10      real, intent(in), device :: x(:)11    end12    function f3(x) ! ok13      real, intent(in), device :: x(:,:)14    end15    !ERROR: OPERATOR(-) function 'f4' conflicts with intrinsic operator16    attributes(device) function f4(x)17      real, intent(in) :: x(:,:,:)18    end19    !ERROR: OPERATOR(-) function 'f5' conflicts with intrinsic operator20    function f5(x)21      real, intent(in), unified :: x(:,:,:,:)22    end23    !ERROR: OPERATOR(-) function 'f6' conflicts with intrinsic operator24    attributes(device) function f6(x)25      real, intent(in), managed :: x(:,:,:,:,:)26    end27  end interface28  interface operator(*)29    !ERROR: OPERATOR(*) function 'f11' conflicts with intrinsic operator30    function f11(x, y)31      real, intent(in) :: x, y32    end33    !ERROR: OPERATOR(*) function 'f12' conflicts with intrinsic operator34    attributes(device) function f12(x, y)35      real, intent(in), device :: x, y(:)36    end37    !ERROR: OPERATOR(*) function 'f13' conflicts with intrinsic operator38    attributes(device) function f13(x, y)39      real, intent(in) :: x(:), y40    end41    function f14a(x, y) ! ok42      real, intent(in), device :: x(:)43      real, intent(in) :: y(:)44    end45    function f14b(x, y) ! ok46      real, intent(in) :: x47      real, intent(in), device :: y(:,:)48    end49    !ERROR: OPERATOR(*) function 'f15' conflicts with intrinsic operator50    function f15(x, y)51      real, intent(in) :: x(:,:)52      real, intent(in), unified :: y53    end54    !ERROR: OPERATOR(*) function 'f16' conflicts with intrinsic operator55    attributes(device) function f16(x, y)56      real, intent(in), device :: x(:,:)57      real, intent(in), managed :: y(:,:)58    end59  end interface60  interface assignment(=)61    !ERROR: Defined assignment subroutine 's1' conflicts with intrinsic assignment62    subroutine s1(x, y)63      real, intent(in out) :: x64      real, intent(in) :: y65    end66    !ERROR: Defined assignment subroutine 's2' conflicts with intrinsic assignment67    attributes(device) subroutine s2(x, y)68      real, intent(in out), device :: x(:)69      real, intent(in), device :: y70    end71    !ERROR: Defined assignment subroutine 's3' conflicts with intrinsic assignment72    attributes(device) subroutine s3(x, y)73      real, intent(in out) :: x(:)74      real, intent(in) :: y(:)75    end76    subroutine s4a(x, y) ! ok77      real, intent(in out), device :: x(:,:)78      real, intent(in) :: y79    end80    subroutine s4b(x, y) ! ok81      real, intent(in out) :: x(:,:)82      real, intent(in), device :: y(:,:)83    end84    !ERROR: Defined assignment subroutine 's5' conflicts with intrinsic assignment85    subroutine s5(x, y)86      real, intent(in out) :: x(:,:,:)87      real, intent(in), unified :: y88    end89    !ERROR: Defined assignment subroutine 's6' conflicts with intrinsic assignment90    attributes(device) subroutine s6(x, y)91      real, intent(in out), device :: x(:,:,:)92      real, intent(in), managed :: y(:,:,:)93    end94  end interface95end96