blob: 1abae9f7943e1e4c585710d76ee726a2b397e49a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-sink" } */
int foo(int *a, int r)
{
int ret = 0;
*a = 1;
if (r == 3)
*a = 5;
else
ret = r + 20;
return ret;
}
/* *a = 1 should be sunk to the else block. */
/* { dg-final { scan-tree-dump-times "Sinking" 1 "sink" } } */
|