On Tue, Feb 26, 2019 at 08:37:28AM +0000, Paul Richard Thomas wrote: > Your timing is astonishing. This was next on my list of TODOs - not > for this particular PR but to deal with the rodata bloat eg. 84487. I > presume that this patch will make the latter go away? > > Yes, this is good for trunk and, if it fixes 84487, 8-branch as well.
The patch doesn't change anything on https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84487#c4 It is really mostly about compile time memory. If a data section variable is initialized with such initializer, it makes no difference in what is emitted. The only difference is that it is more efficient in the compiler to handle such initializer if it is large, and if an automatic variable is ininitialized from such CONSTRUCTOR, the gimplifier can decide to initialize at runtime using a loop or loops rather than using memcpy from a large .rodata initializer. Jakub