From patchwork Tue Sep 19 13:03:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 815524 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-462477-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="xaeuvm6X"; 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 3xxNPD07Z9z9s7g for ; Tue, 19 Sep 2017 23:04:15 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:mime-version :content-type; q=dns; s=default; b=aZ1RyCbYQ+yUKwHIQR0sg29ayPyDe c4aHq6j0yYK4ot4KmkwO7uSJoaH/qNTkDerZgV4T8Qz0zu7PkhH3EhqsZ4i/azCU 3QuTjMuGxC4JxaL/F2cMGSg4mxog0mPQJ9yfNAks2IhSg3o9Sk0+HHrevnbe67ys yTE1vGQAndVZks= 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:date :from:to:cc:subject:message-id:reply-to:mime-version :content-type; s=default; bh=PC5Rkt+4diIFocdX/L9t2Y1RbP8=; b=xae uvm6XlYXi9Xb0MqbQ4pZ2Iw0VpMRTpiDBCpE6mBWGV59fA7WWghi23FrvrtyLKEX t5PLfMdB3o456qp5hm7ynUNJzhjui28dSWPUa8H4eyZOY3kNM6VahlphbL7eF783 Ytclt7J0GDfAp92sT5WU9nd0hpVzJ/usyAxHF1Vg= Received: (qmail 68203 invoked by alias); 19 Sep 2017 13:04: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 68156 invoked by uid 89); 19 Sep 2017 13:04:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.9 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 19 Sep 2017 13:04:03 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C87C77E43E; Tue, 19 Sep 2017 13:04:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com C87C77E43E Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jakub@redhat.com Received: from tucnak.zalov.cz (ovpn-116-102.ams2.redhat.com [10.36.116.102]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 709435D980; Tue, 19 Sep 2017 13:04:01 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id v8JD3xHE017276; Tue, 19 Sep 2017 15:03:59 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id v8JD3wEG017275; Tue, 19 Sep 2017 15:03:58 +0200 Date: Tue, 19 Sep 2017 15:03:58 +0200 From: Jakub Jelinek To: Jason Merrill , Nathan Sidwell Cc: gcc-patches@gcc.gnu.org Subject: [C++ PATCH] Some check-c++-all fixes Message-ID: <20170919130358.GO1701@tucnak> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.7.1 (2016-10-04) X-IsSubscribed: yes Hi! In make check-c++-all I've noticed some UNSUPPORTED tests and some failures, the following patch attempts to fix those. The failures are due to new not emitting operator new (...) != NULL comparison with -std=c++17 anymore, so there is nothing to fold away (first 2 hunks). The rest is about tests which are dg-do run, but for -std=c++17 and above contain dg-error and thus the execution test part is UNSUPPORTED. Regtested with make check-c++-all on x86_64-linux and i686-linux, ok for trunk? 2017-09-19 Jakub Jelinek * g++.dg/tree-ssa/pr31146-2.C: Only do scan-tree-dump for c++14_down. * g++.dg/tree-ssa/pr41428.C: Likewise. * g++.dg/expr/bool1.C: Only do dg-do compile instead of dg-do run for c++17 and up. * g++.dg/expr/bool3.C: Likewise. * g++.dg/expr/bitfield5.C: Likewise. * g++.old-deja/g++.jason/bool5.C: Likewise. Jakub --- gcc/testsuite/g++.dg/tree-ssa/pr41428.C.jj 2015-05-29 15:04:33.000000000 +0200 +++ gcc/testsuite/g++.dg/tree-ssa/pr41428.C 2017-09-19 14:23:13.366127516 +0200 @@ -11,4 +11,6 @@ int foo(void) return *(int *)&f; } -/* { dg-final { scan-tree-dump "Folded into: if \\\(1 != 0\\\)" "ccp1" } } */ +/* -std=c++17 and above doesn't emit operator new () != NULL, so there is + nothing to fold anymore. */ +/* { dg-final { scan-tree-dump "Folded into: if \\\(1 != 0\\\)" "ccp1" { target c++14_down } } } */ --- gcc/testsuite/g++.dg/tree-ssa/pr31146-2.C.jj 2016-09-21 08:54:09.000000000 +0200 +++ gcc/testsuite/g++.dg/tree-ssa/pr31146-2.C 2017-09-19 14:23:41.675773292 +0200 @@ -20,4 +20,6 @@ double foo (void) return v.a[2]; } -/* { dg-final { scan-tree-dump "Replaced .* != 0B. with .1" "forwprop1" } } */ +/* -std=c++17 and above doesn't emit operator new () != NULL, so there is + nothing to fold anymore. */ +/* { dg-final { scan-tree-dump "Replaced .* != 0B. with .1" "forwprop1" { target c++14_down } } } */ --- gcc/testsuite/g++.dg/expr/bool1.C.jj 2017-09-15 18:11:05.000000000 +0200 +++ gcc/testsuite/g++.dg/expr/bool1.C 2017-09-19 14:16:46.139972669 +0200 @@ -1,5 +1,6 @@ -// { dg-do run } -// PR C++/29295 +// PR c++/29295 +// { dg-do run { target c++14_down } } +// { dg-do compile { target c++17 } } // make sure that a typedef for a bool will have the // the same results as a bool itself. --- gcc/testsuite/g++.dg/expr/bool3.C.jj 2017-09-15 18:11:05.000000000 +0200 +++ gcc/testsuite/g++.dg/expr/bool3.C 2017-09-19 14:16:40.439044001 +0200 @@ -1,5 +1,6 @@ -// { dg-do run } -// PR C++/29295 +// PR c++/29295 +// { dg-do run { target c++14_down } } +// { dg-do compile { target c++17 } } // make sure that a typedef for a bool will have the // the same results as a bool itself. --- gcc/testsuite/g++.dg/expr/bitfield5.C.jj 2017-09-15 18:11:05.000000000 +0200 +++ gcc/testsuite/g++.dg/expr/bitfield5.C 2017-09-19 14:12:40.087051397 +0200 @@ -1,5 +1,6 @@ // PR c++/30274 -// { dg-do run } +// { dg-do run { target c++14_down } } +// { dg-do compile { target c++17 } } struct S { bool x : 4; --- gcc/testsuite/g++.old-deja/g++.jason/bool5.C.jj 2017-09-15 18:11:08.000000000 +0200 +++ gcc/testsuite/g++.old-deja/g++.jason/bool5.C 2017-09-19 14:17:19.708552643 +0200 @@ -1,4 +1,5 @@ -// { dg-do run } +// { dg-do run { target c++14_down } } +// { dg-do compile { target c++17 } } int main () { bool b = false;