Changeset View
Changeset View
Standalone View
Standalone View
openmp/libomptarget/test/offloading/static_linking.c
// RUN: %libomptarget-compile-generic -DLIBRARY -c -o %t.o | // RUN: %libomptarget-compile-generic -DLIBRARY -c -o %t.o | ||||
// RUN: ar rcs %t.a %t.o | // RUN: ar rcs %t.a %t.o | ||||
// RUN: %libomptarget-compile-generic %t.a && %libomptarget-run-generic 2>&1 | %fcheck-generic | // RUN: %libomptarget-compile-generic %t.a && %libomptarget-run-generic 2>&1 | %fcheck-generic | ||||
// UNSUPPORTED: nvptx64-nvidia-cuda-oldDriver | |||||
// UNSUPPORTED: amdgcn-amd-amdhsa-oldDriver | |||||
#ifdef LIBRARY | #ifdef LIBRARY | ||||
int x = 42; | int x = 42; | ||||
#pragma omp declare target(x) | #pragma omp declare target(x) | ||||
int foo() { | int foo() { | ||||
int value; | int value; | ||||
#pragma omp target map(from : value) | #pragma omp target map(from : value) | ||||
value = x; | value = x; | ||||
Show All 14 Lines |