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

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Note, adjusted testcase:
struct S { int a, b; };
int foo () { return 42; }
template <int N>
const S a = { 42, foo () };
const S *b = &a <0>;
template <int N>
const S c =  { 42, foo () };
template const S c <0>;
template <int N>
const S d =  { 42, foo () };
const S *e = &d <0>;
template const S d <0>;
template <int N>
const S f =  { 42, foo () };
template const S f <0>;
const S *g = &f <0>;
int main () {}
started crashing with r6-1525-g350562a75dfb4ac658adf620665871eb47166652
(before that commit it failed to link).
When there is partly constant and partly dynamic initializer, we were never
considering putting it into .bss section.

Reply via email to