[LLVMbugs] [Bug 2417] New: clang emits wrong bitcode with initialization of a global variable with a static function ptr
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Thu Jun 5 12:49:05 PDT 2008
http://llvm.org/bugs/show_bug.cgi?id=2417
Summary: clang emits wrong bitcode with initialization of a
global variable with a static function ptr
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: LLVM Codegen
AssignedTo: unassignedbugs at nondot.org
ReportedBy: nunoplopes at sapo.pt
CC: llvmbugs at cs.uiuc.edu
clang emits wrong bitcode with initialization of a global variable with a
static function pointer.
the error is:
Global is external, but doesn't have external or dllimport or weak linkage!
i32 (...)* @zm_activate_zlib
invalid linkage type for function declaration
i32 (...)* @zm_activate_zlib
Broken module found, compilation aborted!
I don't know much about LLVM's bitcode, but maybe a static function must have
external linkage when it's referenced by a global symbol. This seems to be what
llvm-gcc does..
--
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