https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108498

--- Comment #22 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The C/C++ FEs since r9-6625-gbec1da64aec26a490 turn some array initializers
into strings.

Anyway, I wonder if for GCC 14 we couldn't just treat STRING_CST the same as
INTEGER_CST during the merging into groups and instead deal with all of that
during split_group.
I.e. only at that time see that for this subset of stores we want to merge them
into one STRING_CST store, these others handle differently, etc.  And the
preconditions for handling something the STRING_CST way would be contiguous
chunk with byte aligned start/end containg at least one longer STRING_CST.  So,
we wouldn't give up e.g. in
the second testcase, but merge the STRING_CSTs stores with the 4 byte
INTEGER_CST store in between them, while handling the bitfield stuff at the
start and/or the end to separate stores.

Reply via email to