re PR middle-end/68046 (-ftrapv doesn't catch leaq-based overflows on x86-64)
authorRichard Biener <rguenther@suse.de>
Thu, 22 Oct 2015 11:44:11 +0000 (11:44 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 22 Oct 2015 11:44:11 +0000 (11:44 +0000)
commita51ca2f4959300090a44a57010d4866e04b1b1e5
tree277387790bdb8a7475b00903c33cb056d7e6d36d
parent08e99efb2e7b5638af23f6c2b54840e7a943e107
re PR middle-end/68046 (-ftrapv doesn't catch leaq-based overflows on x86-64)

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

PR middle-end/68046
PR middle-end/61893
* optabs.c (emit_libcall_block_1): Allow a NULL_RTX equiv.
(expand_binop): For -ftrapv optabs do not record an REG_EQUAL note.
(expand_unop): Likewise.

* gcc.dg/torture/ftrapv-2.c: New testcase.

From-SVN: r229170
gcc/ChangeLog
gcc/optabs.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/ftrapv-2.c [new file with mode: 0644]