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 middle-end/49958] fold performs invalid association


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49958

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-08-03 13:33:31 UTC ---
Author: rguenth
Date: Wed Aug  3 13:33:28 2011
New Revision: 177270

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177270
Log:
2011-08-03  Richard Guenther  <rguenther@suse.de>

    PR middle-end/49958
    * fold-const.c (fold_binary_loc): Only associate
    (+ (+ (* a b) c) (* d e)) as (+ (+ (* a b) (* d e)) c) if
    overflow wraps.

        * gcc.dg/torture/pr49958.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.dg/torture/pr49958.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/fold-const.c
    trunk/gcc/testsuite/ChangeLog


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