http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46626
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org
|gnu.org |
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-12-23
12:34:40 UTC ---
Created attachment 22846
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22846
gcc46-pr46626.patch
Untested fix. The problem seems to be that the B::B() ctor body, which is
constexpr (and g++ generated) has a CLEANUP_STMT in it, and
build_data_member_initialization ignores CLEANUP_STMT, which means the setting
of vtable pointer to _ZTV1B + 16 is ignored, thus it stays to be _ZTV1A + 16.
The attached patch handles CLEANUP_BODY of CLEANUP_STMT by recursing into it.