[Bug tree-optimization/41339] Variables can occur multiple times in cfun->local_decls

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Feb 8 09:20:00 GMT 2017


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.


More information about the Gcc-bugs mailing list