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

             Bug #: 12067
           Summary: static global of class type not initialized in c++11
                    mode
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++0x
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified


Given

struct nsMemoryImpl {
  virtual void f();
};
static nsMemoryImpl sGlobalMemory;
void f(nsMemoryImpl *);
void g() {
  f(&sGlobalMemory);
}

clang normally produces

@_ZL13sGlobalMemory = internal global %struct.nsMemoryImpl { i32 (...)**
bitcast (i8** getelementptr inbounds ([3 x i8*]* @_ZTV12nsMemoryImpl, i64 0,
i64 2) to i32 (...)**) }, align 8

but with -std=c++11

it produces


@_ZL13sGlobalMemory = internal global { [8 x i8] } undef, align 8

-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to