1 ! RUN: %python %S/test_errors.py %s %flang_fc1
4 !ERROR: OPERATOR(-) function 'f1' conflicts with intrinsic operator
8 !ERROR: OPERATOR(-) function 'f2' conflicts with intrinsic operator
9 attributes(device) function f2(x)
10 real, intent(in), device :: x(:)
13 real, intent(in), device :: x(:,:)
15 !ERROR: OPERATOR(-) function 'f4' conflicts with intrinsic operator
16 attributes(device) function f4(x)
17 real, intent(in) :: x(:,:,:)
19 !ERROR: OPERATOR(-) function 'f5' conflicts with intrinsic operator
21 real, intent(in), unified :: x(:,:,:,:)
23 !ERROR: OPERATOR(-) function 'f6' conflicts with intrinsic operator
24 attributes(device) function f6(x)
25 real, intent(in), managed :: x(:,:,:,:,:)
29 !ERROR: OPERATOR(*) function 'f11' conflicts with intrinsic operator
31 real, intent(in) :: x, y
33 !ERROR: OPERATOR(*) function 'f12' conflicts with intrinsic operator
34 attributes(device) function f12(x, y)
35 real, intent(in), device :: x, y(:)
37 !ERROR: OPERATOR(*) function 'f13' conflicts with intrinsic operator
38 attributes(device) function f13(x, y)
39 real, intent(in) :: x(:), y
41 function f14a(x, y) ! ok
42 real, intent(in), device :: x(:)
43 real, intent(in) :: y(:)
45 function f14b(x, y) ! ok
47 real, intent(in), device :: y(:,:)
49 !ERROR: OPERATOR(*) function 'f15' conflicts with intrinsic operator
51 real, intent(in) :: x(:,:)
52 real, intent(in), unified :: y
54 !ERROR: OPERATOR(*) function 'f16' conflicts with intrinsic operator
55 attributes(device) function f16(x, y)
56 real, intent(in), device :: x(:,:)
57 real, intent(in), managed :: y(:,:)
60 interface assignment(=)
61 !ERROR: Defined assignment subroutine 's1' conflicts with intrinsic assignment
63 real, intent(in out) :: x
66 !ERROR: Defined assignment subroutine 's2' conflicts with intrinsic assignment
67 attributes(device) subroutine s2(x, y)
68 real, intent(in out), device :: x(:)
69 real, intent(in), device :: y
71 !ERROR: Defined assignment subroutine 's3' conflicts with intrinsic assignment
72 attributes(device) subroutine s3(x, y)
73 real, intent(in out) :: x(:)
74 real, intent(in) :: y(:)
76 subroutine s4a(x, y) ! ok
77 real, intent(in out), device :: x(:,:)
80 subroutine s4b(x, y) ! ok
81 real, intent(in out) :: x(:,:)
82 real, intent(in), device :: y(:,:)
84 !ERROR: Defined assignment subroutine 's5' conflicts with intrinsic assignment
86 real, intent(in out) :: x(:,:,:)
87 real, intent(in), unified :: y
89 !ERROR: Defined assignment subroutine 's6' conflicts with intrinsic assignment
90 attributes(device) subroutine s6(x, y)
91 real, intent(in out), device :: x(:,:,:)
92 real, intent(in), managed :: y(:,:,:)