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
libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
torture
/
pr67953.c
blob
68ff0132425de651e533c464316bbe3e5130b18f
1
/* PR tree-optimization/67953 */
2
/* { dg-do run } */
3
4
unsigned int
5
fn1
(
signed int
a
)
6
{
7
return
(
unsigned int
)
a
- ((
a
/
3
) *
3
);
8
}
9
10
unsigned int
11
fn2
(
signed int
a
)
12
{
13
return
a
- ((
a
/
3
) *
3
);
14
}
15
16
unsigned int
17
fn3
(
int
a
)
18
{
19
return
a
- (
unsigned
) ((
a
/
3
) *
3
);
20
}
21
22
signed int
23
fn4
(
int
a
)
24
{
25
return
(
unsigned
)
a
- (
unsigned
) ((
a
/
3
) *
3
);
26
}
27
28
int
29
main
()
30
{
31
if
(
fn1
(-
5
) != -
2
32
||
fn2
(-
5
) != -
2
33
||
fn3
(-
5
) != -
2
34
||
fn4
(-
5
) != -
2
)
35
__builtin_abort
();
36
}