From patchwork Tue Jul 24 09:50:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 948283 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-482110-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="TrQGXLei"; 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 41ZYWl2GzVz9s3N for ; Tue, 24 Jul 2018 19:50:41 +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=TTkP/xYFGtQWwSfynZ9WtNr5W1bqy SVswnO8IbNH1vZiAqshQlFPWVYBwxDaGXvKalxri1x8nJlUi+/S48S+zpxl9xUDu hVKwQSuKpDqpl2HrydSKa5shBS5cwXYi4p5FtBPNOzdQLp3754s2fSiSyzkJHN+Y 0IukR9yIPACWdA= 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=iYU3JINFPzCqeh3QCPABVBwnv+Q=; b=TrQ GXLeiVJgwF/PqE0jDH5UfOhs7tyNR5Bs3yZozxjGl5GCf7NPMP4VcnigNz5bmyLI 7ZXOP2PXTRPmhmeVfpIK2MQrlJ71uxpI5zzpLQuhBXzLZY+KaNYbWeJzeOQQYgE/ lAdhSdBpCgYNHOWRFnqCbwMpyk65OQuyT4UPmcp4= Received: (qmail 108932 invoked by alias); 24 Jul 2018 09:50:34 -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 108923 invoked by uid 89); 24 Jul 2018 09:50:33 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=sk:wnonnul, sk:Wnonnul 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, 24 Jul 2018 09:50:32 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 467F93082A44; Tue, 24 Jul 2018 09:50:31 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-117-71.ams2.redhat.com [10.36.117.71]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DF71360BE4; Tue, 24 Jul 2018 09:50:30 +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 w6O9oStn024625; Tue, 24 Jul 2018 11:50:29 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id w6O9oRRS024624; Tue, 24 Jul 2018 11:50:27 +0200 Date: Tue, 24 Jul 2018 11:50:27 +0200 From: Jakub Jelinek To: Richard Biener Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix up pr19476-{1,5}.C (PR testsuite/86649) Message-ID: <20180724095027.GC17988@tucnak> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes Hi! When looking at PR86569 testresults, I must have missed these two tests (but looking at test_summary outputs, I see it now). When we no longer fold this during cp_fold (to avoid code generation changes between -Wnonnull-compare and -Wno-nonnull-compare), it isn't folded from the first pass; with -O2 it is folded during evrp and with -O1 during dom2. Note, the test would fail before with -Wnonnull-compare, e.g. on 8 branch (which doesn't have the PR86569 changes), I see: make check-c++-all RUNTESTFLAGS='--target_board=unix\{,-Wnonnull-compare\} dg.exp=pr19476*' === g++ Summary for unix === # of expected passes 72 Running target unix/-Wnonnull-compare Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. Using /usr/share/dejagnu/config/unix.exp as generic interface file for target. Using /usr/src/gcc-8/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. Running /usr/src/gcc-8/gcc/testsuite/g++.dg/dg.exp ... FAIL: g++.dg/tree-ssa/pr19476-1.C -std=gnu++98 scan-tree-dump ccp1 "return 42" FAIL: g++.dg/tree-ssa/pr19476-1.C -std=gnu++11 scan-tree-dump ccp1 "return 42" FAIL: g++.dg/tree-ssa/pr19476-1.C -std=gnu++14 scan-tree-dump ccp1 "return 42" FAIL: g++.dg/tree-ssa/pr19476-1.C -std=gnu++17 scan-tree-dump ccp1 "return 42" FAIL: g++.dg/tree-ssa/pr19476-1.C -std=gnu++2a scan-tree-dump ccp1 "return 42" FAIL: g++.dg/tree-ssa/pr19476-1.C -std=gnu++17 -fconcepts scan-tree-dump ccp1 "return 42" FAIL: g++.dg/tree-ssa/pr19476-5.C -std=gnu++98 scan-tree-dump ccp1 "return 42" FAIL: g++.dg/tree-ssa/pr19476-5.C -std=gnu++11 scan-tree-dump ccp1 "return 42" FAIL: g++.dg/tree-ssa/pr19476-5.C -std=gnu++14 scan-tree-dump ccp1 "return 42" FAIL: g++.dg/tree-ssa/pr19476-5.C -std=gnu++17 scan-tree-dump ccp1 "return 42" FAIL: g++.dg/tree-ssa/pr19476-5.C -std=gnu++2a scan-tree-dump ccp1 "return 42" FAIL: g++.dg/tree-ssa/pr19476-5.C -std=gnu++17 -fconcepts scan-tree-dump ccp1 "return 42" === g++ Summary for unix/-Wnonnull-compare === # of expected passes 60 # of unexpected failures 12 Especially for -O2 that people use most, folding it at evrp time seems to be early enough for me. Fixed by testing this only in dom2, tested on x86_64-linux, ok for trunk? 2018-07-24 Jakub Jelinek PR testsuite/86649 * g++.dg/tree-ssa-/pr19476-1.C: Check dom2 dump instead of ccp1. * g++.dg/tree-ssa-/pr19476-5.C: Likewise. Jakub --- gcc/testsuite/g++.dg/tree-ssa/pr19476-1.C.jj 2015-05-29 15:04:33.037803445 +0200 +++ gcc/testsuite/g++.dg/tree-ssa/pr19476-1.C 2018-07-24 11:39:10.108897097 +0200 @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O -fdump-tree-ccp1 -fdelete-null-pointer-checks" } */ +/* { dg-options "-O -fdump-tree-dom2 -fdelete-null-pointer-checks" } */ /* { dg-skip-if "" keeps_null_pointer_checks } */ // See pr19476-5.C for a version without including . @@ -12,5 +12,5 @@ int g(){ return 42 + (0 == new int[50]); } -/* { dg-final { scan-tree-dump "return 42" "ccp1" } } */ -/* { dg-final { scan-tree-dump-not "return 33" "ccp1" } } */ +/* { dg-final { scan-tree-dump "return 42" "dom2" } } */ +/* { dg-final { scan-tree-dump-not "return 33" "dom2" } } */ --- gcc/testsuite/g++.dg/tree-ssa/pr19476-5.C.jj 2015-05-29 15:04:33.038803430 +0200 +++ gcc/testsuite/g++.dg/tree-ssa/pr19476-5.C 2018-07-24 11:39:26.190913802 +0200 @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O -fdump-tree-ccp1 -fdelete-null-pointer-checks" } */ +/* { dg-options "-O -fdump-tree-dom2 -fdelete-null-pointer-checks" } */ /* { dg-skip-if "" keeps_null_pointer_checks } */ // See pr19476-1.C for a version that includes . @@ -8,4 +8,4 @@ int g(){ return 42 + (0 == new int[50]); } -/* { dg-final { scan-tree-dump "return 42" "ccp1" } } */ +/* { dg-final { scan-tree-dump "return 42" "dom2" } } */