https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41339
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> --- inline void __attribute__((always_inline)) __morestack_fail (const char *msg) { static char nl[] = "\n"; writev (&nl[0]); } void allocate_segment () { static const char msg[] = ""; __morestack_fail (msg); __morestack_fail (msg); } so in this case it's inlining putting 'nl' into local-decls twice.