aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/abs-1.c
blob: ce4041111033f51bcefcac0da6338902b209fa72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* PR tree-optimization/109722 */
/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-gimple -fdump-tree-optimized" } */

int g(signed char x){
    x = x < 0 ? -x : x;
    return x == 0;
}

/* This should work even if int is 16bits. */
/* { dg-final { scan-tree-dump "ABSU_EXPR" "gimple"} } */
/* { dg-final { scan-tree-dump-not "ABSU_EXPR" "optimized"} } */