From patchwork Wed Oct 17 17:20:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 985471 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-487748-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="hTpWa486"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.b="aUqRmE1o"; 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 42ZzVK63RBz9s9G for ; Thu, 18 Oct 2018 04:21:12 +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=WscBivbKZS0Z1Qjask9Y6oCHsn2HkMabg4TppXio99S8sQ+r+X VFhfWiQ9BL62cBDzMd8D65Lx5rNbJI962gAfm/HfwUCTfAKhSnnN5Dvb6900ipoL zDv72HvJup1HMPz1QOvpElO7W/WKXEXwYZF1kRTPSvoM9+PuTHL4fx+r8= 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=r3FuWnxv2uS55bkrisN+tWxplO8=; b=hTpWa486ycO35B9uMgWH R5INOHrWBi9ouoZF8BFdn2Y4nLCpfKHQ27IuTN9n7GIdaAqSuOqXKDlQMsHBs/55 FlxccHPLlNUA1s4GuGXjXibrCJ9S8I7q+WSWk+p0+SFNpB5JpMNhgkLJCLj8wqce MkTjB7aTvbNVqw8dyYVS2q8= Received: (qmail 101512 invoked by alias); 17 Oct 2018 17:21:05 -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 101500 invoked by uid 89); 17 Oct 2018 17:21:04 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.4 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=promptly 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; Wed, 17 Oct 2018 17:21:03 +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 w9HHDmPU117968; Wed, 17 Oct 2018 17:21:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=to : cc : from : subject : message-id : date : mime-version : content-type; s=corp-2018-07-02; bh=cAIeEYOJppcFGyjhbvNqI1x8WkhYMxYbZqkKzZ2DIAg=; b=aUqRmE1o6kULUz26k08TNJ9Zq1qjcfJ4BWl28uH7wI9c9QNCf4okFSed+UE40EKJQsFI HF3L+tJFIaZWXuk2n9T3IYlBiZRvQ6SndR/8uopN0J2NmJeZ2m93mBRn4vLX8E/LFBwH asEQOd1hwn/3DsEUS2uJfSXzDnHqT6l6m40TpNbD7ps7Vrb+yGnKzVrVs6DVRHAgWyGW qdfD16rDWohBNa8qYwob+vYjMkE0whXIeMQtbW9ejqU7fWGnfHMYHrfVPbodgoBTOlDd WO+7eD5qbj+yZgLG+Wms/G7zwDBAqqIvI7EFgC0tXleLygaU5aVC5jSJI+BB6djY2S1M Dw== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2n39brg98q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 17 Oct 2018 17:21:01 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w9HHKt0i019137 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 17 Oct 2018 17:20:56 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w9HHKtkK030757; Wed, 17 Oct 2018 17:20:55 GMT Received: from [192.168.1.4] (/79.33.232.114) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 17 Oct 2018 10:20:55 -0700 To: "gcc-patches@gcc.gnu.org" Cc: Jason Merrill From: Paolo Carlini Subject: [C++ Patch] Remove quick fix for c++/85553 Message-ID: <602ede9d-2165-551a-d61d-6fa711886eff@oracle.com> Date: Wed, 17 Oct 2018 19:20:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 X-IsSubscribed: yes Hi, as you probably remember, very close to the release of 8.1.0 we noticed that my fix for c++/70808 was causing c++/85553, which Jakub promptly fixed. However, we later found out that the real problem was a latent issue in convert, which I fixed in r259966. Thus, I think that in current trunk we can revert Jakub's quick fix, now redundant. Tested x86_64-linux. Thanks! Paolo. ////////////////// 2018-10-17 Paolo Carlini * init.c (build_zero_init_1): Remove special casing for NULLPTR_TYPE_P (type), introduced by r259728 and made redundant by r259966. Index: init.c =================================================================== --- init.c (revision 265241) +++ init.c (working copy) @@ -180,10 +180,8 @@ build_zero_init_1 (tree type, tree nelts, bool sta items with static storage duration that are not otherwise initialized are initialized to zero. */ ; - else if (TYPE_PTR_OR_PTRMEM_P (type)) + else if (TYPE_PTR_OR_PTRMEM_P (type) || NULLPTR_TYPE_P (type)) init = fold (convert (type, nullptr_node)); - else if (NULLPTR_TYPE_P (type)) - init = build_int_cst (type, 0); else if (SCALAR_TYPE_P (type)) init = fold (convert (type, integer_zero_node)); else if (RECORD_OR_UNION_CODE_P (TREE_CODE (type)))