This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/83269] [6/7 Regression] Wrong constant folding


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]