From patchwork Tue Mar 27 08:33:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 891421 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-475483-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="Y7a35Ar3"; dkim-atps=neutral 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 409PRl12Mnz9s0n for ; Tue, 27 Mar 2018 19:33:37 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to:cc :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=ModUZTge/aY27/e5hwHmC3Yr2hxrmo8xBLoW/RMmNCEymn+eLK /+QuABWG7+NZsyMk9U6LQpg8dW0gL6F8ltuIjONRWEumSiS5llt0k+TaiIzR3aOG K+wJhk5arDyrovLEzrOgRcWLfwEfjLh19oDQBuE+BQqvFaE+6z2YfKmYU= 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:to:cc :from:subject:message-id:date:mime-version:content-type; s= default; bh=Bo+oZjmeUSklyFK4xnTSnwEGl6M=; b=Y7a35Ar3WgBrpafARQdw gPITy4zurXsJsj9e0jq9X95WyAI8kCLaCMM5AyxaaLWH1FVW+Qpvm1NH/LZRHiUh YUeIL9AJbzZP6ip3c+mjL8gQ35clf33PHpYqrk28QhU0gj4Y5SSVa6k+q0k6lvxU 6LBtWwvOnrkkQyZEf05/3LI= Received: (qmail 33520 invoked by alias); 27 Mar 2018 08:33:29 -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 33511 invoked by uid 89); 27 Mar 2018 08:33:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.1 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=September, september X-HELO: userp2120.oracle.com Received: from userp2120.oracle.com (HELO userp2120.oracle.com) (156.151.31.85) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 27 Mar 2018 08:33:24 +0000 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w2R8X3A7137935; Tue, 27 Mar 2018 08:33:22 GMT Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2120.oracle.com with ESMTP id 2gyjhwr076-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 27 Mar 2018 08:33:22 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w2R8XLUu007379 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 27 Mar 2018 08:33:21 GMT Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w2R8XK8X007385; Tue, 27 Mar 2018 08:33:20 GMT Received: from [192.168.1.4] (/80.181.236.138) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 27 Mar 2018 01:33:19 -0700 To: "gcc-patches@gcc.gnu.org" Cc: Jason Merrill From: Paolo Carlini Subject: [C++ Patch] PR 85067 ("[8 Regression] ICE with volatile parameter in defaulted copy-constructor") Message-ID: Date: Tue, 27 Mar 2018 10:33:16 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8844 signatures=668695 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803270083 X-IsSubscribed: yes Hi, Volker noticed that a tweak I committed back in September, which tidied the diagnostic we produce in C++11 mode for the testcase in c++/68754 causes this error recovery regression. We could try restoring the consistency, for example along the lines of the patchlet I posted on the audit trail (passes testing) but, for 8.1.0 at least, I propose to simply revert that change. Tested x86_64-linux. Thanks, Paolo. ////////////////////// /cp 2018-03-27 Paolo Carlini PR c++/85067 * method.c (defaulted_late_check): Partially revert r253321 changes, do not early return upon error. /testsuite 2018-03-27 Paolo Carlini PR c++/85067 * g++.dg/cpp0x/defaulted51.C: New. * g++.dg/cpp0x/constexpr-68754.C: Adjust. Index: cp/method.c =================================================================== --- cp/method.c (revision 258870) +++ cp/method.c (working copy) @@ -2189,7 +2189,6 @@ defaulted_late_check (tree fn) "expected signature", fn); inform (DECL_SOURCE_LOCATION (fn), "expected signature: %qD", implicit_fn); - return; } if (DECL_DELETED_FN (implicit_fn)) Index: testsuite/g++.dg/cpp0x/constexpr-68754.C =================================================================== --- testsuite/g++.dg/cpp0x/constexpr-68754.C (revision 258870) +++ testsuite/g++.dg/cpp0x/constexpr-68754.C (working copy) @@ -3,5 +3,5 @@ struct base { }; struct derived : base { - constexpr derived& operator=(derived const&) = default; // { dg-error "defaulted declaration" "" { target { ! c++14 } } } + constexpr derived& operator=(derived const&) = default; // { dg-error "defaulted" "" { target { ! c++14 } } } }; Index: testsuite/g++.dg/cpp0x/defaulted51.C =================================================================== --- testsuite/g++.dg/cpp0x/defaulted51.C (nonexistent) +++ testsuite/g++.dg/cpp0x/defaulted51.C (working copy) @@ -0,0 +1,15 @@ +// PR c++/85067 +// { dg-do compile { target c++11 } } + +template struct A +{ + A(); + A(volatile A&) = default; // { dg-error "defaulted" } +}; + +struct B +{ + A<0> a; +}; + +B b;