re PR rtl-optimization/49472 (Compiler segfault on valid code)
authorJakub Jelinek <jakub@redhat.com>
Mon, 4 Jul 2011 18:53:56 +0000 (20:53 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 4 Jul 2011 18:53:56 +0000 (20:53 +0200)
commit707f991907e5c97c56a05654fee49f4940158994
treeb9c8211932e2c4b13367e217f110ffc882b8f5cf
parent15923c25df505b21061fda148dcb2b036af4735a
re PR rtl-optimization/49472 (Compiler segfault on valid code)

PR rtl-optimization/49472
* simplify-rtx.c (simplify_unary_operation_1) <case NEG>: When
negating MULT, negate the second operand instead of first.
(simplify_binary_operation_1) <case MULT>: If one operand is
a NEG and the other is MULT, don't attempt to optimize by
negation of the MULT operand if it only moves the NEG operation
around.

* gfortran.dg/pr49472.f90: New test.

From-SVN: r175821
gcc/ChangeLog
gcc/simplify-rtx.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pr49472.f90 [new file with mode: 0644]