[cfe-dev] Incorrect aliasing between static locals and static globals

Eli Friedman eli.friedman at gmail.com
Tue Feb 5 00:24:22 PST 2008

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.


More information about the cfe-dev mailing list