| 1 |
! { dg-do link { target offload_target_any } } |
| 2 |
! { dg-additional-sources requires-1-aux.f90 } |
| 3 |
|
| 4 |
! Check diagnostic by device-compiler's lto1. |
| 5 |
! Other file uses: 'requires unified_address'. |
| 6 |
|
| 7 |
module m |
| 8 |
integer :: a(10) |
| 9 |
interface |
| 10 |
subroutine foo |
| 11 |
end |
| 12 |
end interface |
| 13 |
end |
| 14 |
|
| 15 |
program main |
| 16 |
!$omp requires unified_shared_memory |
| 17 |
|
| 18 |
!$omp target |
| 19 |
a = 0 |
| 20 |
!$omp end target |
| 21 |
|
| 22 |
call foo () |
| 23 |
end |
| 24 |
|
| 25 |
! { dg-error "OpenMP 'requires' directive with non-identical clauses in multiple compilation units: 'unified_shared_memory' vs. 'unified_address'" "" { target *-*-* } 0 } |
| 26 |
! { dg-note {requires-1\.f90' has 'unified_shared_memory'} {} { target *-*-* } 0 } |
| 27 |
! TODO We're currently not streaming location information for the OpenMP |
| 28 |
! directives used in 'requires-7-aux.c', so we're not seeing the source file |
| 29 |
! name here (but a temporary '*.o' instead; for details, see |
| 30 |
! <https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598011.html>): |
| 31 |
! { dg-note {requires-1-aux\.f90' has 'unified_address'} {} { xfail *-*-* } 0 } |
| 32 |
! ..., but we may still verify that the rest of the diagnostic is correct: |
| 33 |
! { dg-note {' has 'unified_address'} {} { target *-*-* } 0 } |
| 34 |
! { dg-excess-errors "Ignore messages like: errors during merging of translation units|mkoffload returned 1 exit status" } |