1 /* { dg-do compile } */ 2 /* { dg-options "-O2 -fdump-tree-sink-stats" } */ 3 int foo(int a,int b,int c)4foo (int a, int b, int c) 5 { 6 int x = a * b; 7 return c ? x : a; 8 } 9 /* We should sink the x = a * b calculation into the branch that returns x. */ 10 /* { dg-final { scan-tree-dump-times "Sunk statements: 1" 1 "sink" } } */ 11