[LLVMbugs] [Bug 13883] New: clang doesn't compute "nearly empty" correctly in edge cases
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Sep 19 19:17:51 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=13883
Bug #: 13883
Summary: clang doesn't compute "nearly empty" correctly in edge
cases
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: sharparrow1 at yahoo.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Testcase (from gcc testsuite):
struct E1 {};
struct E2 : public E1 {};
struct E : public E1, public E2 {};
struct N : public E { virtual void f () {} };
struct X : virtual public N {
};
int main () {
X x;
/* N should not be the primary base of X; it is not nearly empty. */
if ((void*)&x == (void*)(N*)&x)
return 1;
}
clang's implementation of ItaniumCXXABI::isNearlyEmpty in particular doesn't
check the rule that a nearly empty class "has no proper base class that is
empty, not morally virtual, and at an offset other than zero".
--
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