re PR tree-optimization/83269 (Wrong constant folding)
authorJakub Jelinek <jakub@redhat.com>
Fri, 15 Dec 2017 14:37:52 +0000 (15:37 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 15 Dec 2017 14:37:52 +0000 (15:37 +0100)
commite7425c18b5af5a12f68bde8b5f30adf02a774536
tree244e650451af7f181109c73ce6cd80058234b774
parenta72610d4320925787d635cb4ddb8a40967e05bc3
re PR tree-optimization/83269 (Wrong constant folding)

PR tree-optimization/83269
* fold-const.c (fold_binary_loc): Perform (-A) - B -> (-B) - A
subtraction in arg0's type if type is signed and arg0 is unsigned.
Formatting fix.

* gcc.c-torture/execute/pr83269.c: New test.

From-SVN: r255697
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr83269.c [new file with mode: 0644]