1 /* { dg-do compile } */
2 /* { dg-options "-O -fno-rounding-math -fno-signed-zeros -fdump-tree-optimized-raw" } */
3 
f(double a,double b)4 double f(double a, double b){
5     double c = a - b;
6     return -c;
7 }
8 
g(unsigned x)9 int g(unsigned x){
10     unsigned y = ~x;
11     int z = (int) y;
12     return -z;
13 }
14 
h(unsigned a,unsigned b,unsigned c)15 unsigned h(unsigned a, unsigned b, unsigned c){
16     unsigned d = b - c;
17     unsigned e = a + d;
18     return -e;
19 }
20 
21 /* { dg-final { scan-tree-dump-not "negate_expr" "optimized"} } */
22