1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
3
4 extern void abort (void);
5
6 int
foo1(int x,int y)7 foo1 (int x, int y)
8 {
9 int z;
10
11 if (x >= y)
12 return 1;
13
14 z = y - x;
15 if (z <= 0)
16 abort ();
17
18 return z;
19 }
20
21 unsigned int
foo2(unsigned int x,unsigned int y)22 foo2 (unsigned int x, unsigned int y)
23 {
24 unsigned int z;
25
26 if (x >= y)
27 return 1;
28
29 z = y - x;
30 if (z == 0)
31 abort ();
32
33 return z;
34 }
35
36 /* { dg-final { scan-tree-dump-not "abort" "optimized" } } */
37