repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Daily bump.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
pr105276.C
blob
ad0e9dd7e09752203fa8f544e7c79c7eee8d7a64
1
/* { dg-do compile } */
2
/* { dg-options "-O2 -fdump-tree-optimized" } */
3
4
bool
5
foo(unsigned i)
6
{
7
bool result = true;
8
while (i)
9
{
10
i = i % 3;
11
i = i - (i == 2 ? 2 : i ? 1 : 0);
12
result = !result;
13
}
14
return result;
15
}
16
17
/* We should be able to eliminate the i - operation. */
18
/* { dg-final { scan-tree-dump-not "i_.* - " "optimized" } } */