From: vries Date: Thu, 29 Oct 2015 16:12:52 +0000 (+0000) Subject: Allow CAST_RESTRICT folding X-Git-Tag: upstream/6.1~3603 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f92c64998f6a5f5321b84d400b8014c51530bbf5;p=platform%2Fupstream%2Flinaro-gcc.git Allow CAST_RESTRICT folding 2015-10-29 Tom de Vries * fold-const.c (fold_unary_loc): Remove folding inhibition for restrict types. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229537 138bc75d-0d04-0410-961f-82ee72b054a4 --- 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 + + * fold-const.c (fold_unary_loc): Remove folding inhibition for restrict + types. + 2015-10-29 Nathan Sidwell * 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))