* fold-const.c (fold_unary_loc): Don't optimize
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 4 Oct 2011 12:34:06 +0000 (12:34 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 4 Oct 2011 12:34:06 +0000 (12:34 +0000)
commit5a41d783acbed929d6fe7da7dfe989e4953bc454
treee03429ddfdb28c26c0b8a6b943ec84b3196db8b1
parentda8e87834082d6cd5c2f82c38285f702bb280de1
* fold-const.c (fold_unary_loc): Don't optimize
POINTER_PLUS_EXPR casted to TYPE_RESTRICT pointer by
casting the inner pointer if it isn't TYPE_RESTRICT.
* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Don't through
casts from non-TYPE_RESTRICT pointer to TYPE_RESTRICT pointer.

* gcc.dg/tree-ssa/restrict-4.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179500 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/restrict-4.c [new file with mode: 0644]
gcc/tree-ssa-forwprop.c