20 lines · c
1// RUN: %libomptarget-compile-generic -DSHARED -fPIC -shared -o %t.so && \2// RUN: %libomptarget-compile-generic %t.so && %libomptarget-run-generic 2>&1 | %fcheck-generic3// RUN: %libomptarget-compileopt-generic -DSHARED -fPIC -shared -o %t.so && \4// RUN: %libomptarget-compileopt-generic %t.so && %libomptarget-run-generic 2>&1 | %fcheck-generic5//6// REQUIRES: gpu7 8#ifdef SHARED9void foo() {}10#else11#include <stdio.h>12int main() {13#pragma omp target14 ;15 // CHECK: DONE.16 printf("%s\n", "DONE.");17 return 0;18}19#endif20