This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/55137] [4.8 Regression] Unexpected static structure initialization
- 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: Thu, 06 Dec 2012 14:37:16 +0000
- Subject: [Bug c++/55137] [4.8 Regression] Unexpected static structure initialization
- Auto-submitted: auto-generated
- References: <bug-55137-4@http.gcc.gnu.org/bugzilla/>
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