]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/pr77975.c
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / pr77975.c
1 /* PR tree-optimization/77975 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-ivcanon-details" } */
4
5 /* { dg-final { scan-tree-dump-times "Proved that loop 1 iterates 1 times using brute force" 1 "ivcanon" } } */
6
7 unsigned int
8 foo (unsigned int *b)
9 {
10 unsigned int a = 3;
11 while (a)
12 {
13 a >>= 1;
14 *b += a;
15 }
16 return a;
17 }
18
19 /* { dg-final { scan-tree-dump-times "Proved that loop 1 iterates 2 times using brute force" 1 "ivcanon" } } */
20
21 unsigned int
22 bar (unsigned int *b)
23 {
24 unsigned int a = 7;
25 while (a)
26 {
27 a >>= 1;
28 *b += a;
29 }
30 return a;
31 }