
Fix-up for recent commit 683f118439
"OpenMP: Move omp requires checks to libgomp".
gcc/
* lto-cgraph.cc (input_offload_tables) <LTO_symtab_edge>: Correct
'fn2' computation.
libgomp/
* testsuite/libgomp.c-c++-common/requires-1.c: Add 'dg-note's.
* testsuite/libgomp.c-c++-common/requires-2.c: Likewise.
* testsuite/libgomp.c-c++-common/requires-3.c: Likewise.
* testsuite/libgomp.c-c++-common/requires-7.c: Likewise.
* testsuite/libgomp.fortran/requires-1.f90: Likewise.
26 lines
859 B
C
26 lines
859 B
C
/* { dg-do link { target offload_target_any } } */
|
|
/* { dg-additional-sources requires-1-aux.c } */
|
|
|
|
/* Check diagnostic by device-compiler's lto1.
|
|
Other file uses: 'requires unified_address'. */
|
|
|
|
#pragma omp requires unified_shared_memory
|
|
|
|
int a[10];
|
|
extern void foo (void);
|
|
|
|
int
|
|
main (void)
|
|
{
|
|
#pragma omp target
|
|
for (int i = 0; i < 10; i++)
|
|
a[i] = 0;
|
|
|
|
foo ();
|
|
return 0;
|
|
}
|
|
|
|
/* { dg-error "OpenMP 'requires' directive with non-identical clauses in multiple compilation units: 'unified_shared_memory' vs. 'unified_address'" "" { target *-*-* } 0 }
|
|
{ dg-note {requires-1\.c' has 'unified_shared_memory'} {} { target *-*-* } 0 }
|
|
{ dg-note {requires-1-aux\.c' has 'unified_address'} {} { target *-*-* } 0 } */
|
|
/* { dg-excess-errors "Ignore messages like: errors during merging of translation units|mkoffload returned 1 exit status" } */
|