
This patch fuses the RUN lines for most libomptarget tests. The previous patch D101315 created separate test targets for each supported offloading triple. This patch updates the RUN lines in libomptarget tests to use a generic run line independent of the offloading target selected for the lit instance. In cases, where no RUN line was defined for a specific offloading target, the corresponding target is declared as XFAIL. If it turns out that a test actually supports the target, the XFAIL line can be removed. Differential Revision: https://reviews.llvm.org/D101326
30 lines
887 B
C
30 lines
887 B
C
// RUN: %libomptarget-compile-generic -fopenmp-version=51
|
|
// RUN: %libomptarget-run-fail-generic 2>&1 \
|
|
// RUN: | %fcheck-generic
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
int main() {
|
|
int i;
|
|
|
|
// CHECK: addr=0x[[#%x,HOST_ADDR:]], size=[[#%u,SIZE:]]
|
|
fprintf(stderr, "addr=%p, size=%ld\n", &i, sizeof i);
|
|
|
|
// CHECK-NOT: Libomptarget
|
|
#pragma omp target enter data map(alloc: i)
|
|
#pragma omp target exit data map(present, release: i)
|
|
|
|
// CHECK: i was present
|
|
fprintf(stderr, "i was present\n");
|
|
|
|
// CHECK: Libomptarget message: device mapping required by 'present' map type modifier does not exist for host address 0x{{0*}}[[#HOST_ADDR]] ([[#SIZE]] bytes)
|
|
// CHECK: Libomptarget fatal error 1: failure of target construct while offloading is mandatory
|
|
#pragma omp target exit data map(present, release: i)
|
|
|
|
// CHECK-NOT: i was present
|
|
fprintf(stderr, "i was present\n");
|
|
|
|
return 0;
|
|
}
|