[Bug c/49768] [4.6/4.7 Regression] C99 style union initializations does not work as expected with optimizations
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Jul 17 22:11:00 GMT 2011
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.
More information about the Gcc-bugs
mailing list