[LLVMbugs] [Bug 13700] New: inlined function local memory is not reused when function returns
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Aug 25 12:49:17 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=13700
Bug #: 13700
Summary: inlined function local memory is not reused when
function returns
Product: libraries
Version: 3.1
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: Common Code Generator Code
AssignedTo: unassignedbugs at nondot.org
ReportedBy: yozh at mx1.ru
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 9110
--> http://llvm.org/bugs/attachment.cgi?id=9110
recursive function, large locals
Code: https://gist.github.com/3469192 (also attached)
Works fine when compiled with -O0. When compiled with -O2, results in stack
overflow: "foo" function is inlined in "bar". When "foo" function returns,
"bar" does not reuse memory allocated for "foo" for recursive invocation of
self.
Both Clang and LLVM-GCC have this issue.
Code works fine in GCC.
% clang --version
Apple clang version 4.0 (tags/Apple/clang-421.0.57) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin12.1.0
Thread model: posix
% clang --version
clang version 3.1 (branches/release_31)
Target: x86_64-unknown-linux-gnu
Thread model: posix
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list