This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/49768] [4.6/4.7 Regression] C99 style union initializations does not work as expected with optimizations
- 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: Sun, 17 Jul 2011 22:11:38 +0000
- Subject: [Bug c/49768] [4.6/4.7 Regression] 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
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org
|gnu.org |
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-07-17 22:10:40 UTC ---
fold_nonarray_ctor_reference is buggy, it seems to consider only fields where
offset is within bitoffset .. bitoffset_end range. But here offset is 0, size
is 8 and bitoffset is 1 and bitoffset_end 2. These overlap, thus either
fold_nonarray_ctor_reference should give up (return NULL), or it should try to
reconstruct it from multiple fields.