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



--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-12-06 
14:37:16 UTC ---

Author: jakub

Date: Thu Dec  6 14:37:09 2012

New Revision: 194250



URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194250

Log:

    PR c++/55137

    * fold-const.c (fold_binary_loc) <associate>: Don't introduce

    TREE_OVERFLOW through reassociation.  If type doesn't have defined

    overflow, but one or both of the operands do, use the wrapping type

    for reassociation and only convert to type at the end.



    * g++.dg/opt/pr55137.C: New test.

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



Added:

    trunk/gcc/testsuite/g++.dg/opt/pr55137.C

    trunk/gcc/testsuite/gcc.c-torture/execute/pr55137.c

Modified:

    trunk/gcc/ChangeLog

    trunk/gcc/fold-const.c

    trunk/gcc/testsuite/ChangeLog

Reply via email to