| 1 |
! Check that errors are detected if other trait-properties are given with |
| 2 |
! kind(any). |
| 3 |
|
| 4 |
integer function f1 (x) |
| 5 |
integer, intent(in) :: x |
| 6 |
f1 = x + 1 |
| 7 |
end function |
| 8 |
integer function f2 (x) |
| 9 |
integer, intent(in) :: x |
| 10 |
f2 = x + 2 |
| 11 |
end function |
| 12 |
integer function f3 (x) |
| 13 |
integer, intent(in) :: x |
| 14 |
f3 = x + 3 |
| 15 |
end function |
| 16 |
integer function f4 (x) |
| 17 |
integer, intent(in) :: x |
| 18 |
f4 = x + 4 |
| 19 |
end function |
| 20 |
integer function f5 (x) |
| 21 |
integer, intent(in) :: x |
| 22 |
f4 = x + 5 |
| 23 |
end function |
| 24 |
integer function f6 (x) |
| 25 |
integer, intent(in) :: x |
| 26 |
f4 = x + 6 |
| 27 |
end function |
| 28 |
|
| 29 |
integer function f (x) |
| 30 |
integer, intent(in) :: x |
| 31 |
|
| 32 |
!$omp declare variant (f1) match (device={kind(any,gpu)}) ! { dg-error "no other trait-property may be specified" } |
| 33 |
!$omp declare variant (f2) match (device={kind(cpu,"any")}) ! { dg-error "no other trait-property may be specified" } |
| 34 |
!$omp declare variant (f3) match (device={kind("any"),arch(x86_64)}) ! { dg-error "no other trait-property may be specified" } |
| 35 |
!$omp declare variant (f4) match (device={arch(x86_64),kind(any)}) ! { dg-error "no other trait-property may be specified" } |
| 36 |
!$omp declare variant (f5) match (device={kind(any,"any")}) ! { dg-error "trait-property .any. specified more than once" } |
| 37 |
!$omp declare variant (f6) match (device={kind("any",any)}) ! { dg-error "trait-property .any. specified more than once" } |
| 38 |
|
| 39 |
f = x |
| 40 |
end function |