
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
29 lines
675 B
C
29 lines
675 B
C
// RUN: %libomptarget-compile-generic
|
|
// RUN: %libomptarget-run-generic 2>&1 \
|
|
// RUN: | %fcheck-generic
|
|
|
|
|
|
// END.
|
|
|
|
#include <omp.h>
|
|
#include <stdio.h>
|
|
|
|
int main() {
|
|
int arr[100];
|
|
|
|
#pragma omp target data map(alloc: arr[50:2]) // partially mapped
|
|
{
|
|
#pragma omp target // would implicitly map with full size but already present
|
|
{
|
|
arr[50] = 5;
|
|
arr[51] = 6;
|
|
} // must treat as present (dec ref count) even though full size not present
|
|
} // wouldn't delete if previous ref count dec didn't happen
|
|
|
|
// CHECK: still present: 0
|
|
fprintf(stderr, "still present: %d\n",
|
|
omp_target_is_present(&arr[50], omp_get_default_device()));
|
|
|
|
return 0;
|
|
}
|