http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28865

--- Comment #18 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I disagree.  DECL_SIZE and .size are IMHO correct here at this point, and
component sizes (FIELD_DECL) can't match, because we shouldn't be changing the
type of the decl to some other type just because it got an initializer.  The
bug is IMHO really just in miscounting the size of the padding of the
initializer and thus emitting into the data/rodata etc. section more bytes of
data from what .size/arrays/-fsection-anchors assumes.  Outside of arrays on
non-fsection-anchors target this is just ugly (except where you e.g. put the
structs into named sections and use it as a kind of array say through
beginning/end of the named section), for -fsection-anchors it is of course a
wrong-code (well, wrong-data) bug.

Reply via email to