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: "Liu, Hongtao" X-Patchwork-Id: 46149 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 606123858C39 for ; Wed, 13 Oct 2021 02:10:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 606123858C39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1634091045; 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=R+18n2ujJhiDL9xvkFxV1ueW0w4yLFsRovNBwQ9OIppjml6bmtxZwukybkCvxJpJm axu7eyOIQGEnZp5SU337LrCuHukWV7gZPywNRH9+0s5Gf+8uSaPD7TOYaZ7Vbtb/Da BQwgDN13PEDXk8wZzeSRsb6bKBv913d40ZYQwmPo= 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: "Liu, Hongtao" Reply-To: liuhongt Errors-To: gcc-patches-bounces+patchwork=sourceware.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; };