Skip gnat.dg/prot7.adb on hppa.
[official-gcc.git] / libgomp / testsuite / libgomp.c-c++-common / requires-7.c
blob63afcc92b9a9988159aa3b6dce709868a93b2693
1 /* { dg-do link { target offload_target_any } } */
2 /* { dg-additional-sources requires-7-aux.c } */
4 /* Check diagnostic by device-compiler's lto1.
5 Other file uses: 'requires unified_address'. */
7 #pragma omp requires unified_shared_memory
9 int a[10];
10 extern void foo (void);
12 int
13 main (void)
15 #pragma omp target
16 for (int i = 0; i < 10; i++)
17 a[i] = 0;
19 foo ();
20 return 0;
23 /* { dg-error "OpenMP 'requires' directive with non-identical clauses in multiple compilation units: 'unified_shared_memory' vs. 'unified_address'" "" { target *-*-* } 0 }
24 { dg-note {requires-7\.c' has 'unified_shared_memory'} {} { target *-*-* } 0 }
25 TODO We're currently not streaming location information for the OpenMP
26 directives used in 'requires-7-aux.c', so we're not seeing the source file
27 name here (but a temporary '*.o' instead; for details, see
28 <https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598011.html>):
29 { dg-note {requires-7-aux\.c' has 'unified_address'} {} { xfail *-*-* } 0 }
30 ..., but we may still verify that the rest of the diagnostic is correct:
31 { dg-note {' has 'unified_address'} {} { target *-*-* } 0 } */
32 /* { dg-excess-errors "Ignore messages like: errors during merging of translation units|mkoffload returned 1 exit status" } */