/
pccc
/
pccc-mlir
Обзор
Документация
Войти
/
pccc
/
pccc-mlir
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
master
offload/test/offloading/static_linking.c
28 строк
505 B
obitotsky
fork mlir
19 июл 2026, 07:05
Верифицирован
19 июл 2026, 07:05
6422b87
Код
Авторство
О чём код?
// clang-format off // RUN: %libomptarget-compile-generic -DLIBRARY -c -o %t.o // RUN: ar rcs %t.a %t.o // RUN: %libomptarget-compile-generic %t.a && %libomptarget-run-generic 2>&1 | %fcheck-generic // clang-format on #ifdef LIBRARY int x = 42; #pragma omp declare target(x) int foo() { int value; #pragma omp target map(from : value) value = x; return value; } #else #include <stdio.h> int foo(void); int main() { int x = foo(); // CHECK: PASS if (x == 42) printf("PASS\n"); } #endif