[RISCV][VLOPT] Add vector narrowing integer right shift instructions to isSupportedIn...
[llvm-project.git] / offload / test / offloading / shared_lib_fp_mapping.c
blobffb4bc90d4e4f530fabcad3eabff1133178c9b26
1 // clang-format off
2 // RUN: %clang-generic -fPIC -shared %S/../Inputs/declare_indirect_func.c -o %T/libslfm.so -fopenmp-version=51
3 // RUN: %libomptarget-compile-generic -rpath %T -L %T -l slfm -o %t -fopenmp-version=51
4 // RUN: env LIBOMPTARGET_INFO=32 %t 2>&1 | %fcheck-generic
5 // clang-format on
7 #include <stdio.h>
9 extern int func(); // Provided in liba.so, returns 42
10 typedef int (*fp_t)();
12 int main() {
13 int x = 0;
14 fp_t fp = &func;
15 printf("TARGET\n");
16 #pragma omp target map(from : x)
17 x = fp();
18 // CHECK: Copying data from device to host, {{.*}} Size=8
19 // CHECK: Copying data from device to host, {{.*}} Size=4
20 // CHECK: 42
21 printf("%i\n", x);