This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/39981] New: zero-size base class optimization fails in certain scenarios
- From: "navinkumar+bugs at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Apr 2009 18:50:01 -0000
- Subject: [Bug c++/39981] New: zero-size base class optimization fails in certain scenarios
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Scenario1A: When class X inherits from A, B, and C; and A and C are empty
classes, then gcc properly creates X such that: sizeof(X) == sizeof(B)
Scenario1B: When class X inherits from A and B; and A is an empty class, then
gcc properly creates X such that: sizeof(X) == sizeof(B)
Scenario2A: When class X inherits from A, B, and C; and A and C are empty
classes inheriting from another empty class, then gcc IMPROPERLY creates X such
that: sizeof(X) > sizeof(B)
Scenario2B: When class X is a composite of A and B; and A is an empty class
inheriting from another empty class, then gcc properly creates X such that:
sizeof(X) == sizeof(B)
--
Summary: zero-size base class optimization fails in certain
scenarios
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: critical
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: navinkumar+bugs at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39981