This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/83269] [6/7 Regression] Wrong constant folding
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 15 Dec 2017 22:16:06 +0000
- Subject: [Bug tree-optimization/83269] [6/7 Regression] Wrong constant folding
- Auto-submitted: auto-generated
- References: <bug-83269-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83269
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Fri Dec 15 22:15:30 2017
New Revision: 255729
URL: https://gcc.gnu.org/viewcvs?rev=255729&root=gcc&view=rev
Log:
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.
Added:
branches/gcc-7-branch/gcc/testsuite/gcc.c-torture/execute/pr83269.c
Modified:
branches/gcc-7-branch/gcc/ChangeLog
branches/gcc-7-branch/gcc/fold-const.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog