diff options
author | Tom de Vries <tom@codesourcery.com> | 2015-10-29 16:12:52 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2015-10-29 16:12:52 +0000 |
commit | 3ddb720ebfccb2c64d731cd841ce3388e87abf55 (patch) | |
tree | 40a3e97f2b1e557cf7e741f3471aa37032909704 | |
parent | 682494423e37dd92fa14b7722375a7b2cc6893f5 (diff) | |
download | gcc-3ddb720ebfccb2c64d731cd841ce3388e87abf55.zip gcc-3ddb720ebfccb2c64d731cd841ce3388e87abf55.tar.gz gcc-3ddb720ebfccb2c64d731cd841ce3388e87abf55.tar.bz2 |
Allow CAST_RESTRICT folding
2015-10-29 Tom de Vries <tom@codesourcery.com>
* fold-const.c (fold_unary_loc): Remove folding inhibition for restrict
types.
From-SVN: r229537
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fold-const.c | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8229fa3..2d42512 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-10-29 Tom de Vries <tom@codesourcery.com> + + * fold-const.c (fold_unary_loc): Remove folding inhibition for restrict + types. + 2015-10-29 Nathan Sidwell <nathan@codesourcery.com> * omp-low.c (lower_omp_target): Remove unreachable code & merge diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 26fd735..47ed609 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -7770,7 +7770,6 @@ fold_unary_loc (location_t loc, enum tree_code code, tree type, tree op0) that this happens when X or Y is NOP_EXPR or Y is INTEGER_CST. */ if (POINTER_TYPE_P (type) && TREE_CODE (arg0) == POINTER_PLUS_EXPR - && (!TYPE_RESTRICT (type) || TYPE_RESTRICT (TREE_TYPE (arg0))) && (TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST || TREE_CODE (TREE_OPERAND (arg0, 0)) == NOP_EXPR || TREE_CODE (TREE_OPERAND (arg0, 1)) == NOP_EXPR)) |