llvm-project/offload/test/offloading/dynamic_module.c
Ethan Luis McDonough 8823448807
[Offload] Refactor offload test requirements (#95196)
Many tests in the `offload` project have requirements defined by which
targets are not supported rather than which platforms are supported.
This patch aims to streamline the requirement definitions by adding four
new feature tags: `host`, `gpu`, `amdgpu`, and `nvidiagpu`.
2024-06-29 00:56:18 -05:00

20 lines
524 B
C

// RUN: %libomptarget-compile-generic -DSHARED -fPIC -shared -o %t.so && \
// RUN: %libomptarget-compile-generic %t.so && %libomptarget-run-generic 2>&1 | %fcheck-generic
// RUN: %libomptarget-compileopt-generic -DSHARED -fPIC -shared -o %t.so && \
// RUN: %libomptarget-compileopt-generic %t.so && %libomptarget-run-generic 2>&1 | %fcheck-generic
//
// REQUIRES: gpu
#ifdef SHARED
void foo() {}
#else
#include <stdio.h>
int main() {
#pragma omp target
;
// CHECK: DONE.
printf("%s\n", "DONE.");
return 0;
}
#endif