mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-27 07:31:28 +00:00
ecc080c07d
- `nothing` directive was effecting the `if` block structure which it should not. So return an empty statement instead of an error statement while parsing to avoid this.
27 lines
397 B
C
27 lines
397 B
C
// RUN: %libomp-compile
|
|
// RUN: %libomp-run | FileCheck %s --check-prefix OMP-CHECK
|
|
|
|
#include <stdio.h>
|
|
|
|
void foo(int x) {
|
|
printf("foo");
|
|
return;
|
|
}
|
|
|
|
int main() {
|
|
int x = 4;
|
|
// should call foo()
|
|
if (x % 2 == 0)
|
|
#pragma omp nothing
|
|
foo(x);
|
|
|
|
// should not call foo()
|
|
x = 3;
|
|
if (x % 2 == 0)
|
|
#pragma omp nothing
|
|
foo(x);
|
|
|
|
// OMP-CHECK: foo
|
|
// OMP-CHECK-NOT: foo
|
|
return 0;
|
|
} |