From patchwork Mon Dec 24 09:27:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: C++ PATCH for c++/54325 (wrong error initializing abstract base class) Date: Sun, 23 Dec 2012 23:27:27 -0000 From: Paolo Carlini X-Patchwork-Id: 208040 Message-Id: <50D81FFF.1050303@oracle.com> To: Jason Merrill Cc: gcc-patches List ... to explain more concretely what I mean, if I *brutally* hack mainline per the below, then the testcase is accepted. Paolo. ////////////////// Index: call.c =================================================================== --- call.c (revision 194659) +++ call.c (working copy) @@ -7535,7 +7535,11 @@ build_new_method_call_1 (tree instance, tree fns, if (CONSTRUCTOR_NELTS (init_list) == 0 && TYPE_HAS_DEFAULT_CONSTRUCTOR (basetype) && !processing_template_decl) - init = build_value_init (basetype, complain); + { + push_deferring_access_checks (dk_no_check); + init = build_value_init (basetype, complain); + pop_deferring_access_checks (); + } /* If BASETYPE is an aggregate, we need to do aggregate initialization. */