2015-11-18 Richard Biener <rguenther@suse.de>
commit0e952a5bb18685e0d2892bd305b4f1a1c1d103fe
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 18 Nov 2015 12:23:14 +0000 (18 12:23 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 18 Nov 2015 12:23:14 +0000 (18 12:23 +0000)
tree3150fcb636f40f88f7afea9d9f79523cbffe104f
parent86c2c12a4422c8770b6d6b468cdb628b63c8c81b
2015-11-18  Richard Biener  <rguenther@suse.de>

Backport from mainline
2015-10-28  Richard Biener  <rguenther@suse.de>

PR middle-end/68067
* fold-const.c (negate_expr_p): We cannot negate plus or minus
if overflow is not wrapping.  Likewise multiplication unless
one operand is constant and not power of two.
(fold_negate_expr): Adjust accordingly.

* gcc.dg/torture/pr68067-1.c: New testcase.
* gcc.dg/torture/pr68067-2.c: Likewise.

2015-10-26  Richard Biener  <rguenther@suse.de>
Dominik Vogt  <vogt@linux.vnet.ibm.com>

PR middle-end/67443
* alias.c (ao_ref_from_mem): Remove promoted subreg handling.
Properly prune ref->ref for accesses outside of ref.

* gcc.target/s390/pr67443.c: New testcase.

2015-10-20  Richard Biener  <rguenther@suse.de>

PR tree-optimization/68017
* tree-tailcall.c (eliminate_tail_call): Remove stmts backwards.

* gcc.dg/torture/pr68017.c: New testcase.

2015-09-23   Richard Biener  <rguenther@suse.de>

PR middle-end/67662
* fold-const.c (fold_binary_loc): Do not reassociate two vars with
undefined overflow unless they will cancel out.

* gcc.dg/ubsan/pr67662.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@230542 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/alias.c
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr68017.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/torture/pr68067-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/torture/pr68067-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/ubsan/pr67662.c [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/pr67443.c [new file with mode: 0644]
gcc/tree-tailcall.c