diff options
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 5d64c17..1ecd225 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -8027,6 +8027,14 @@ fold_unary (enum tree_code code, tree type, tree op0) switch (code) { + case PAREN_EXPR: + /* Re-association barriers around constants and other re-association + barriers can be removed. */ + if (CONSTANT_CLASS_P (op0) + || TREE_CODE (op0) == PAREN_EXPR) + return fold_convert (type, op0); + return NULL_TREE; + case NOP_EXPR: case FLOAT_EXPR: case CONVERT_EXPR: |