[LLVMbugs] [Bug 12423] New: problem emitting static variable

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Mar 30 11:11:26 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=12423

             Bug #: 12423
           Summary: problem emitting static variable
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: rafael.espindola at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


For

void bar(const char**);
void foo(int x) {
  if (x)     {
    static const char* keys[] = {"foo"};
    bar(keys);
  }
  else {
    static const char* keys[] = {"bar", "zed"};
    bar(keys);
  }
}

gcc will produce

_ZZ3fooiE4keys:
...
_ZZ3fooiE4keys_0:
...

Old clang produces
@_ZZ3fooiE4keys = ...
@_ZZ3fooiE4keys1 =...

but we currently error with
error: problem emitting static variable '_ZZ3fooiE4keys': already present as
different kind of symbol

-- 
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