[LLVMbugs] [Bug 154] NEW: [llvm-link] global arrays don't get linked properly
bugzilla-daemon at zion.cs.uiuc.edu
bugzilla-daemon at zion.cs.uiuc.edu
Tue Nov 25 11:21:32 PST 2003
http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=154
Summary: [llvm-link] global arrays don't get linked properly
Product: tools
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: llvm-link
AssignedTo: sabre at nondot.org
ReportedBy: brukman+bugs at uiuc.edu
% cat a.c
int var[5];
% cat b.c
extern int var[];
void foo() {
var[var[0]] = 42;
}
% llvm-gcc -c b.c
% llvm-gcc -c a.c
% llvm-link a.o b.o -o c.o
% llvm-dis < c.o|grep var
%var = weak global [5 x int] [ int 0, int 0, int 0, int 0, int 0 ] ;
<[5 x int]*> [#uses=0]
%var = external global [0 x int] ; <[0 x int]*> [#uses=2]
[... snip ...]
One would think these 'var's would become the same 'var', because, at least,
that's the intent of the programmer. I'm having similar trouble with symbols in
the Linux kernel, but there, there is no 'weak' modifier, but still two
variables with the same name, one global, one external global.
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the llvm-bugs
mailing list