xfail scan-tree-dump-not throw in g++.dg/pr99966.C on hppa*64*-*-*
[official-gcc.git] / libgomp / testsuite / libgomp.c-c++-common / requires-2.c
blobb20e154b0c70bc54fcd6e785cc3911392015c2b7
1 /* { dg-do link { target offloading_enabled } } */
2 /* { dg-additional-options "-foffload=disable -flto" } */
3 /* { dg-additional-sources requires-2-aux.c } */
5 /* Check diagnostic by host's lto1.
6 Other file does not have any 'omp requires'. */
8 #pragma omp requires unified_shared_memory
10 int a[10];
11 extern void foo (void);
13 int
14 main (void)
16 #pragma omp target
17 for (int i = 0; i < 10; i++)
18 a[i] = 0;
20 foo ();
21 return 0;
24 /* { dg-error "OpenMP 'requires' directive with 'unified_shared_memory' specified only in some compilation units" "" { target *-*-* } 0 }
25 { dg-note {requires-2\.c' has 'unified_shared_memory'} {} { target *-*-* } 0 }
26 { dg-note {but '[^']*requires-2-aux\.c' has not} {} { target *-*-* } 0 } */
27 /* { dg-excess-errors "Ignore messages like: errors during merging of translation units|mkoffload returned 1 exit status" } */