From patchwork Wed Oct 13 02:09:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: liuhongt X-Patchwork-Id: 1540104 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=gxgcGFOR; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HTbbg1cD9z9t1Q for ; Wed, 13 Oct 2021 13:10:39 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6409B385842C for ; Wed, 13 Oct 2021 02:10:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6409B385842C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1634091036; bh=nhQhqlkDWh9EToF271+eiA2lcpdzdw3Mq5E5c9+SxPY=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=gxgcGFORfl9tcLA3pRjxOjZK7xBfOskTFiq8AbKp5M2H27j9OoGO4jSfi50h0LL+5 9SaWErhRBVv9NlWAuXcQoACVv3ohJKdaBP6WcVg2rr5krVugjP03YTUFKmgCIMS+SH txeIkxXL1EOVOk+gp6NGg+X188bf3dE0wFUfpPFA= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by sourceware.org (Postfix) with ESMTPS id 5BEB7385840D for ; Wed, 13 Oct 2021 02:09:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5BEB7385840D X-IronPort-AV: E=McAfee;i="6200,9189,10135"; a="250736262" X-IronPort-AV: E=Sophos;i="5.85,369,1624345200"; d="scan'208";a="250736262" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2021 19:09:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,369,1624345200"; d="scan'208";a="441462086" Received: from scymds01.sc.intel.com ([10.148.94.138]) by orsmga006.jf.intel.com with ESMTP; 12 Oct 2021 19:09:14 -0700 Received: from shliclel320.sh.intel.com (shliclel320.sh.intel.com [10.239.236.50]) by scymds01.sc.intel.com with ESMTP id 19D29DFx007562; Tue, 12 Oct 2021 19:09:13 -0700 To: gcc-patches@gcc.gnu.org Subject: [PATCH] Adjust testcase for O2 vectorization[Wuninitialized] Date: Wed, 13 Oct 2021 10:09:12 +0800 Message-Id: <20211013020912.34817-1-hongtao.liu@intel.com> X-Mailer: git-send-email 2.18.1 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: liuhongt via Gcc-patches From: liuhongt Reply-To: liuhongt Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" As discussed in PR. It looks like it's just the the location of the warning that's off, the warning itself is still issued but it's swallowed by the dg-prune-output directive. Since the test was added to verify the fix for an ICE without vectorization I think disabling vectorization should be fine. Ideally, we would understand why the location is wrong so let's keep this bug open and add a comment to the test referencing this bug. Pushed to trunk. gcc/testsuite/ChangeLog: * g++.dg/warn/Wuninitialized-13.C: Add -fno-tree-vectorize. --- gcc/testsuite/g++.dg/warn/Wuninitialized-13.C | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/g++.dg/warn/Wuninitialized-13.C b/gcc/testsuite/g++.dg/warn/Wuninitialized-13.C index 210e74c3c3b..e92978f809a 100644 --- a/gcc/testsuite/g++.dg/warn/Wuninitialized-13.C +++ b/gcc/testsuite/g++.dg/warn/Wuninitialized-13.C @@ -1,11 +1,14 @@ /* PR c/98597 - ICE in -Wuninitialized printing a MEM_REF { dg-do compile } - { dg-options "-O2 -Wall" } */ + { dg-options "-O2 -Wall -fno-tree-vectorize" } */ +/* After vectorization, the location of the warning that's off, + the warning itself is still issued but it's swallowed by + the dg-prune-output directive. Refer to pr102700. */ struct shared_count { shared_count () { } shared_count (shared_count &r) - : pi (r.pi) { } // { dg-warning "\\\[-Wuninitialized" "" { xfail { i?86-*-* x86_64-*-* } } } + : pi (r.pi) { } // { dg-warning "\\\[-Wuninitialized"} int pi; };