[LLVMbugs] [Bug 13025] New: Undefined reference to alloca when using bitcode
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jun 4 19:23:21 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=13025
Bug #: 13025
Summary: Undefined reference to alloca when using bitcode
Product: dragonegg
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: New Bugs
AssignedTo: baldrick at free.fr
ReportedBy: scott+llvm+bugzilla at pakin.org
CC: llvmbugs at cs.uiuc.edu, scott+llvm+bugzilla at pakin.org
Classification: Unclassified
Created attachment 8682
--> http://llvm.org/bugs/attachment.cgi?id=8682
Reproducer that can't compile with DragonEgg to bitcode then link with Clang
I'm compiling with DragonEgg into bitcode (well, ASCII bitcode) then linking
the result with Clang. The problem is that variable-sized arrays lead to
"undefined reference to `alloca'" errors, as the attached reproducer
demonstrates.
$ g++ -fplugin=/home/pakin/llvm/lib/dragonegg.so
-fplugin-arg-dragonegg-emit-ir -S -o badlink.ll badlink.cc
$ clang++ -o badlink badlink.ll
/tmp/badlink-dgcsTw.o: In function `main':
badlink.ll:(.text+0x54): undefined reference to `alloca'
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
A pure Clang workflow (i.e., no DragonEgg) has no problems, though:
$ clang++ -emit-llvm -S -o badlink.ll badlink.cc
$ clang++ -o badlink badlink.ll
-- Scott
--
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