[LLVMbugs] [Bug 12067] New: static global of class type not initialized in c++11 mode
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Feb 22 12:44:29 PST 2012
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: unassignedclangbugs at nondot.org
ReportedBy: rafael.espindola at gmail.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
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.
More information about the llvm-bugs
mailing list