This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/49768] [4.6/4.7 Regression] C99 style union initializations does not work as expected with optimizations


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]