[Bug c++/39981] zero-size base class optimization fails in certain scenarios

2009-11-09 Thread navinkumar+bugs at gmail dot com
--- Comment #10 from navinkumar+bugs at gmail dot com 2009-11-09 18:08 --- After review, I agree it is not a bug. Because _0_emptyB and _2_emptyB both inherent from empty_t, the compiler is obligated to ensure that static_cast(static_cast<_0_emptyB*>(compositeB2)) != stati

[Bug c++/39981] zero-size base class optimization fails in certain scenarios

2009-11-09 Thread navinkumar+bugs at gmail dot com
--- Comment #8 from navinkumar+bugs at gmail dot com 2009-11-09 17:39 --- Created an attachment (id=19000) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19000&action=view) demonstrates scenarios when zero-size base class optimization fails, compile with flag: -st

[Bug c++/39981] zero-size base class optimization fails in certain scenarios

2009-11-09 Thread navinkumar+bugs at gmail dot com
--- Comment #7 from navinkumar+bugs at gmail dot com 2009-11-09 17:35 --- (From update of attachment 18986) >#include >#include >#include >#include > >struct empty_t { > template > explicit empty_t(Arg arg) { } >}; > >template >str

[Bug c++/39981] zero-size base class optimization fails in certain scenarios

2009-04-30 Thread navinkumar+bugs at gmail dot com
--- Comment #4 from navinkumar+bugs at gmail dot com 2009-04-30 19:22 --- Since std::is_empty<_2_emptyB>::value && std::is_empty<_2_emptyA>::value (as verified by the static assertions), GCC should not treat _2_emptyB differently from _2_emptyA when computing th

[Bug c++/39981] zero-size base class optimization fails in certain scenarios

2009-04-30 Thread navinkumar+bugs at gmail dot com
--- Comment #2 from navinkumar+bugs at gmail dot com 2009-04-30 18:57 --- Tested with 2 versions of GCC, same behavior; Version #1 Using built-in specs. Target: x86_64-unknown-linux-gnu Configured with: /1123/scratch/gcc4.4.0/src/configure --prefix=/1123/software/gcc4.4.0 --with-local

[Bug c++/39981] zero-size base class optimization fails in certain scenarios

2009-04-30 Thread navinkumar+bugs at gmail dot com
--- Comment #1 from navinkumar+bugs at gmail dot com 2009-04-30 18:54 --- Created an attachment (id=17785) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17785&action=view) demonstrates scenarios when zero-size base class optimization fails compile with flag: -st

[Bug c++/39981] New: zero-size base class optimization fails in certain scenarios

2009-04-30 Thread navinkumar+bugs at gmail dot com
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