Projet_SETI_RISC-V/riscv-gnu-toolchain/gcc/libgomp/testsuite/libgomp.c/target-print-1.c
2023-03-06 14:48:14 +01:00

17 lines
253 B
C

/* Ensure that printf on the offload device works. */
/* { dg-do run } */
/* { dg-output "The answer is 42(\n|\r\n|\r)+" } */
#include <stdio.h>
int var = 42;
int
main ()
{
#pragma omp target
{
printf ("The answer is %d\n", var);
}
}