blob: 7c83007e7f1fc782d3eb65b94b37b34e8b47ad59 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
/* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-optimized" } */
int f(int a, int b, int c)
{
if (a == 0 && b > c)
return 0;
return a;
}
int g(int a, int b, int c)
{
if (a == 42 && b > c)
return 42;
return a;
}
int h(int a, int b, int c, int d)
{
if (a == d && b > c)
return d;
return a;
}
/* { dg-final { scan-tree-dump-times "if" 0 "optimized"} } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
|