[Issue 12820] DMD can inline calls to functions that use alloca, allocating the memory in the caller function instead.
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri May 30 08:04:28 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=12820
--- Comment #1 from Orvid King <blah38621 at gmail.com> ---
I believe that the issue here is not that DMD inlines alloca (which it should)
but instead that it fails to recognize that the memory allocated by alloca
should be released at the end of the scope's body.
Another issue that could be considered to fix this exact code is that the
alloca call there has a size known at compile-time, and so should actually be
getting eliminated entirely in favor of a static array local.
--
More information about the Digitalmars-d-bugs
mailing list