repo.or.cz
/
llvm-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[Instrumentation] Fix a warning
[llvm-project.git]
/
openmp
/
runtime
/
test
/
misc_bugs
/
omp_nothing.c
blob
e50d32d147ec9bc338740ffffcd9110eb08f8ea1
1
// RUN: %libomp-compile
2
// RUN: %libomp-run | FileCheck %s --check-prefix OMP-CHECK
3
4
#include <stdio.h>
5
6
void
foo
(
int
x
) {
7
printf
(
"foo"
);
8
return
;
9
}
10
11
int
main
() {
12
int
x
=
4
;
13
// should call foo()
14
if
(
x
%
2
==
0
)
15
#pragma omp nothing
16
foo
(
x
);
17
18
// should not call foo()
19
x
=
3
;
20
if
(
x
%
2
==
0
)
21
#pragma omp nothing
22
foo
(
x
);
23
24
// OMP-CHECK: foo
25
// OMP-CHECK-NOT: foo
26
return
0
;
27
}