diff options
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 195d1e5..486ca19a 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -1481,7 +1481,9 @@ const_unop (enum tree_code code, tree type, tree arg0) } case ABS_EXPR: - return fold_abs_const (arg0, type); + if (TREE_CODE (arg0) == INTEGER_CST || TREE_CODE (arg0) == REAL_CST) + return fold_abs_const (arg0, type); + break; case CONJ_EXPR: if (TREE_CODE (arg0) == COMPLEX_CST) |