https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115670
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Simplified case too: ``` auto bar(){ struct {int i;} t; t.i = 0; return t; } ``` This should be local linkage. Another testcase: ``` namespace { struct a {int t = 12;}; } auto bar(){ struct a t; return t; } ```