repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Improve atomic store implementation on hppa-linux.
[official-gcc.git]
/
libgomp
/
testsuite
/
libgomp.oacc-c-c++-common
/
switch-conversion.c
blob
0540678d76b04d9101128e0f9b36da9186af684f
1
/* PR tree-optimization/85063 */
2
/* { dg-additional-options "-ftree-switch-conversion" } */
3
4
#include <stdlib.h>
5
6
#pragma acc routine seq
7
static int
__attribute__
((
noinline
))
foo
(
int
n
)
8
{
9
switch
(
n
&
3
)
10
{
11
case
0
:
return
4
;
12
case
1
:
return
3
;
13
case
2
:
return
2
;
14
default
:
15
return
1
;
16
}
17
}
18
19
int
20
main
(
void
)
21
{
22
int
n
[
1
];
23
24
n
[
0
] =
4
;
25
26
#pragma acc parallel copy(n)
27
{
28
n
[
0
] =
foo
(
n
[
0
]);
29
}
30
31
if
(
n
[
0
] !=
4
)
32
abort
();
33
34
return
0
;
35
}