]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/infinite-loop.c
More gimple const/copy propagation opportunities
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / infinite-loop.c
1 /* { dg-do link } */
2 /* { dg-options "-O2" } */
3 void link_error (void);
4
5 void __attribute__ ((noinline,noipa))
6 foo(int a)
7 {
8 int b = 0;
9
10 while (1)
11 {
12 if (!a)
13 break;
14 b = 1;
15 }
16
17 if (b != 0)
18 link_error ();
19 }
20
21 int
22 main()
23 {
24 foo (0);
25 }
26