http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56104
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-25 14:57:47 UTC --- Guess the relevant change in the patch is: --- trunk/gcc/cp/typeck.c 2011/07/19 13:28:15 176460 +++ trunk/gcc/cp/typeck.c 2011/07/19 14:01:59 176461 @@ -3078,8 +3078,7 @@ return error_mark_node; } /* ...and then the delta in the PMF. */ - instance_ptr = build2 (POINTER_PLUS_EXPR, TREE_TYPE (instance_ptr), - instance_ptr, fold_convert (sizetype, delta)); + instance_ptr = fold_build_pointer_plus (instance_ptr, delta); /* Hand back the adjusted 'this' argument to our caller. */ *instance_ptrptr = instance_ptr; where we didn't fold the POINTER_PLUS_EXPR in this case before (delta is 0 here), but now we do. The above is followed by: /* Next extract the vtable pointer from the object. */ vtbl = build1 (NOP_EXPR, build_pointer_type (vtbl_ptr_type_node), instance_ptr); vtbl = cp_build_indirect_ref (vtbl, RO_NULL, complain); if (vtbl == error_mark_node) return error_mark_node; and during cp_build_indirect_ref this warns, instance_ptr here is ADDR_EXPR of cc VAR_DECL, and as the class type of cc isn't virtual, it doesn't have a vtable pointer at the beginning.