From patchwork Thu Feb 13 18:53:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandra Loosemore X-Patchwork-Id: 1237698 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-519495-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha1 header.s=default header.b=ADe4GCRR; 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 48JQfB6nZ5z9sNg for ; Fri, 14 Feb 2020 05:54:09 +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 :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=hpqdp3sKa2dkIh5f8FP9fw41ViyylyZTL5jCJXSWlAwC3cPVCe k7zYkEgdLPM0Gio4DspFX9GCL/dHBNm2ikfG2vFlD4UTtIpVSL7RhKFfNshFhjT2 JfhqPK99F6WhSrjiWNM3vJ4qchsSQXKPRjVlOQUBTZNC2SQxoKq2GsooE= 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 :from:subject:message-id:date:mime-version:content-type; s= default; bh=hEHNe1TKDPKUfZu3ahqIH0p55tc=; b=ADe4GCRRNWm4ncYTFiB5 v2NMpftZpxx/I2Y/EOkQ+3fcZhJ/AeaTEQ7IvxJ3qk2CdIddtCcjaEOG1xCm7bRd 54lS8BZH87IOVGL1EZXg/vFG01aP2HH1FscQkD1gnqmLD9bUOzj6vX/YaWtAeXad R2suSUYq+sWCrPF4njVRzIA= Received: (qmail 3806 invoked by alias); 13 Feb 2020 18:54:01 -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 3786 invoked by uid 89); 13 Feb 2020 18:54:01 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT autolearn=ham version=3.3.1 spammy= X-HELO: esa1.mentor.iphmx.com Received: from esa1.mentor.iphmx.com (HELO esa1.mentor.iphmx.com) (68.232.129.153) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 13 Feb 2020 18:53:59 +0000 IronPort-SDR: qJuShBJpnOVa1EZfBdHK54vY6MxJzCE00v1W4ElpJT0TO/rOxhwZQOvjTScMsBzWCmb6p8uTOh FYc0UJri7jjn3WF95FUvdrJJK20LfWEksuWncbw76380jog9Fb8EIQheKew1nUdAvro+sjTZIN 266VozW3aK2XA17IGlsSvxb+f1UckZV9pNKQnDQfSMqjhrxj4oog+MVcT9PSTPAUQQv+vW9dO1 GFd6aG0hgAcDZu4KljU2iXE0TXHtfiYefGR7WmNcAIOh/kH7/cggYfhIM3n6mduKOCJEeKg5Cy V3E= Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 13 Feb 2020 10:53:58 -0800 IronPort-SDR: IXAspkEMaBOJIs4OgvIdWnfAiA+IGkiJjz9FNAUfO7nmbwiNezLLUJ5BLR/jXWQ5LAicpXIvUO 3+GosOqfgRsxMVIRgOUcUD49F5tzbV+5ei3R89NOr7Y//i+Tp9e3k79ZtJejUiGV1xRdWZ7Cj7 LzftX6ncVMXFHy6ORODb7tx38V3hu9chWKIM8bTeidGgpHpVUOm3+3B3P48q8gYsOGQ4ZOJRMQ RTKnjUS0sGK76IPcY7JX3OKKAGcAA2Gmeyk3ZnIir5TcWWTfKehROgc5e7hIFxgNFshQy1YHrR Fw0= To: "gcc-patches@gcc.gnu.org" From: Sandra Loosemore Subject: [committed, obvious] Add -fdelete-null-pointer-checks to more new C++ testcases. Message-ID: <6ca003fe-2f04-5967-7a54-4a21613e6b18@codesourcery.com> Date: Thu, 13 Feb 2020 11:53:51 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 A few weeks ago I committed this patch to fix some problems I saw in nios2-elf testing: https://gcc.gnu.org/ml/gcc-patches/2020-01/msg01385.html Since then there have been some further new C++ constexpr testcases added that have the same problem with assuming -fdelete-null-pointer-checks. I've committed the attached patch as an obvious followup to the last one. -Sandra commit bb97ad35ead015075ee4747136c9fc75faa27411 Author: Sandra Loosemore Date: Thu Feb 13 10:47:55 2020 -0800 Add -fdelete-null-pointer-checks to more new C++ testcases. 2020-02-13 Sandra Loosemore gcc/testsuite/ * g++.dg/cpp0x/constexpr-static13.C: Add -fdelete-null-pointer-checks. * g++.dg/cpp2a/constexpr-new11.C: Likewise. * g++.dg/cpp2a/constexpr-new12.C: Likewise. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c296fc3..560187c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2020-02-13 Sandra Loosemore + + * g++.dg/cpp0x/constexpr-static13.C: + Add -fdelete-null-pointer-checks. + * g++.dg/cpp2a/constexpr-new11.C: Likewise. + * g++.dg/cpp2a/constexpr-new12.C: Likewise. + 2020-02-13 H.J. Lu PR target/93656 diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-static13.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-static13.C index 644f9f7..2677a22 100644 --- a/gcc/testsuite/g++.dg/cpp0x/constexpr-static13.C +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-static13.C @@ -1,5 +1,6 @@ // PR c++/92003 // { dg-do compile { target c++11 } } +// { dg-additional-options "-fdelete-null-pointer-checks" } // { dg-prune-output "narrowing conversion" } constexpr char const* get_c_str() { return "abc"; } diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new11.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new11.C index 26658d0..2bf359a 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-new11.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new11.C @@ -1,5 +1,6 @@ // PR c++/93633 // { dg-do compile { target c++2a } } +// { dg-additional-options "-fdelete-null-pointer-checks" } struct A { constexpr A () : a (0) {} diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new12.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new12.C index 2dedcd2..04f7597 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-new12.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new12.C @@ -1,5 +1,6 @@ // PR c++/93633 // { dg-do compile { target c++2a } } +// { dg-additional-options "-fdelete-null-pointer-checks" } struct A { constexpr A () : a (0) {}