view gcc/testsuite/gcc.dg/tree-ssa/negminus.c @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 84e7813d76e9
children
line wrap: on
line source

/* { dg-do compile } */
/* { dg-options "-O -fno-rounding-math -fno-signed-zeros -fdump-tree-optimized-raw" } */

double f(double a, double b){
    double c = a - b;
    return -c;
}

int g(unsigned x){
    unsigned y = ~x;
    int z = (int) y;
    return -z;
}

unsigned h(unsigned a, unsigned b, unsigned c){
    unsigned d = b - c;
    unsigned e = a + d;
    return -e;
}

/* { dg-final { scan-tree-dump-not "negate_expr" "optimized"} } */