https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119312
--- Comment #4 from Bruno Haible <bruno at clisp dot org> --- > So, you're basically asking for interprocedural optimization No, I'm basically asking for type analysis: The compiler could note that the struct has an "all fields are const" property, and that this is enough justification to put the variable into .rodata segment if there is an initializer, or into .bss segment if there is no initializer. Or am I missing something?