bugfix(1908): http://llvm.org/bugs/show_bug.cgi?id=1908

this is the final bugfix, i’ve tested with the test cases in the test directory, and this doesnt changed the result, so it doesnt break any other stuff :slight_smile:

Index: Sema/SemaDecl.cpp

Hmm, looks generally reasonable... how does it work with the following testcase?

static int a;
extern int a = 10;

(a should have internal linkage and be initialized to 10.)
-Eli

static int a2;
extern int a2 = 10;
static int a3 = 10;

compiles to:

@a2 = internal global i32 10 ; <i32*> [#uses=0]
@a3 = internal global i32 10 ; <i32*> [#uses=0]

so it looks like it works :slight_smile:

2008/1/23, Eli Friedman <eli.friedman@gmail.com>: