Testcase: static int a() { static int b = 0; return b; } static int b; int c() { b = 10; return a(); } clang -emit-llvm puts both b's into the same global, which is wrong. -Eli