This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/49768] C99 style union initializations does not work as expected with optimizations
- From: "mikpe at it dot uu.se" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 17 Jul 2011 18:23:19 +0000
- Subject: [Bug c/49768] C99 style union initializations does not work as expected with optimizations
- Auto-submitted: auto-generated
- References: <bug-49768-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49768
Mikael Pettersson <mikpe at it dot uu.se> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu.org,
| |mikpe at it dot uu.se
--- Comment #2 from Mikael Pettersson <mikpe at it dot uu.se> 2011-07-17 18:22:21 UTC ---
It started with r164688:
Author: hubicka
Date: Tue Sep 28 16:28:39 2010
New Revision: 164688
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164688
Log:
* tree-ssa-ccp.c (fold_ctor_reference): New function.
(fold_const_aggregate_ref): Use it.
* fold-const.c (canonicalize_constructor_val): Check that we don't fold
into external static.
The dumps from r164687 and r164688 start to differ in pr49768.c.061t.ccp2, when
r164688 removes the runtime check and the static object, and makes the abort()
call unconditional.
Removing the unused initial padding bit field unbreaks the test case.