27 lines · c
1// RUN: %libomp-compile2// RUN: %libomp-run | FileCheck %s --check-prefix OMP-CHECK3 4#include <stdio.h>5 6void foo(int x) {7 printf("foo");8 return;9}10 11int main() {12 int x = 4;13 // should call foo()14 if (x % 2 == 0)15#pragma omp nothing16 foo(x);17 18 // should not call foo()19 x = 3;20 if (x % 2 == 0)21#pragma omp nothing22 foo(x);23 24 // OMP-CHECK: foo25 // OMP-CHECK-NOT: foo26 return 0;27}