From patchwork Tue Feb 4 11:51:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 316559 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 994532C0091 for ; Tue, 4 Feb 2014 22:51:58 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=hXaxBB1OVpbeHaC39PY1GIqGpyf4qy+looR+vVIdDT3 o0ILkqSDEIudC/9Ybi5nWhx2g8F+ZmqzsDbDiydc1a+0+QGdzsmuj7gxP1xTQB22 sdXcaGUk8YjSfX9lkKzjvrbgpjl1PFsRuzzqLMJQr3akU96vcJHXFXc+0wgwGgX4 = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; s=default; bh=cV5HOyBq9dLH2yQyDTJShJarLgk=; b=syxqZ0ci59q8DiDnP vmofma/ZFvFHRaQmsjLb3ndF539p9WyI7VF1x7iPNXhVqODQULCBY7ibfDv3HH+C Dwi4NPxIdb4MLB6zPZinEkH+EmWWWp6L1jXJCPAxErAhV0s1tgV7CgjcEAG4dpCh 6FYzb5EwK1V9iCPGxLLIdjw6Ms= Received: (qmail 4618 invoked by alias); 4 Feb 2014 11:51:48 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 4604 invoked by uid 89); 4 Feb 2014 11:51:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL, BAYES_00, FSL_NEW_HELO_USER, RP_MATCHES_RCVD, SPF_PASS autolearn=no version=3.3.2 X-HELO: userp1040.oracle.com Received: from userp1040.oracle.com (HELO userp1040.oracle.com) (156.151.31.81) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 04 Feb 2014 11:51:47 +0000 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s14BpiKo013623 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 4 Feb 2014 11:51:45 GMT Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s14Bphwe000200 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 4 Feb 2014 11:51:44 GMT Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by userz7022.oracle.com (8.14.5+Sun/8.14.4) with ESMTP id s14BphXX022645; Tue, 4 Feb 2014 11:51:43 GMT Received: from [192.168.1.4] (/79.36.197.119) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 04 Feb 2014 03:51:42 -0800 Message-ID: <52F0D44C.1010106@oracle.com> Date: Tue, 04 Feb 2014 12:51:40 +0100 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: Jason Merrill Subject: [C++ Patch/RFC] PR 60047 X-IsSubscribed: yes Hi, thus I tried to have a look to this issue, while experiencing some weird problems with the debugger, which slowed me down a lot. I have been able to figure out that we don't seem to actively set constexpr_p to true anywhere in implicitly_declare_fn (besides the unrelated case of inheriting constructors), thus I'm wondering if it would make sense to simply do the below?!? (and revert my recent tweak) Otherwise, Jason, if you suspect something deeper is going on, I would rather ask you to take over, today the debugger is still misbehaving on me :( Thanks! Paolo. ////////////////////////// Index: cp/method.c =================================================================== --- cp/method.c (revision 207457) +++ cp/method.c (working copy) @@ -1366,7 +1366,7 @@ synthesized_method_walk (tree ctype, special_funct } vbases = CLASSTYPE_VBASECLASSES (ctype); - if (vec_safe_is_empty (vbases)) + if (vbases == NULL) /* No virtual bases to worry about. */; else if (!assign_p) { @@ -1660,7 +1660,7 @@ implicitly_declare_fn (special_function_kind kind, else if (trivial_p && cxx_dialect >= cxx11 && (kind == sfk_copy_constructor || kind == sfk_move_constructor)) - gcc_assert (constexpr_p); + constexpr_p = true; if (!trivial_p && type_has_trivial_fn (type, kind)) type_set_nontrivial_flag (type, kind); Index: testsuite/g++.dg/cpp0x/pr60047.C =================================================================== --- testsuite/g++.dg/cpp0x/pr60047.C (revision 0) +++ testsuite/g++.dg/cpp0x/pr60047.C (working copy) @@ -0,0 +1,14 @@ +// PR c++/60047 +// { dg-do compile { target c++11 } } + +struct B { }; + +template struct A : virtual B +{ + A(); + A(const A&); +}; + +template A::A(const A&) = default; + +A a = A();