From patchwork Thu Jan 13 10:56:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 49962 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 6C6B33949096 for ; Thu, 13 Jan 2022 10:57:06 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 2AA503948816; Thu, 13 Jan 2022 10:56:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2AA503948816 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: +ciGduWu5wDHLyNPAYHI7a3AyLgjMYQyk3nEOrTb3A7fj8Vr+/UWDlIFTGIwvZvMZ8j4u6qJsH GXSD6KP9iCN653PmOdcwYWtgUMBfrB8ZIhN8EycpGlTG0VnVHZgplC7vVv4Vu02KaOvzYhWP4w VxVyFl0XTZpGT6opeOSRB8iQMAjhSZb3JjTUXcDETwueCJyqtnvv0OsRbRcONvksvVuc6E2c26 BkJjwpWeGejFDnaO+rIltKhFmyZkd1oHWycLercRAXdjYuBoRdbyYDo2kObSsn8qDndVDIN7iP +WzmevW3HQXz2FT24SSz45GR X-IronPort-AV: E=Sophos;i="5.88,284,1635235200"; d="scan'208,223";a="70583168" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 13 Jan 2022 02:56:40 -0800 IronPort-SDR: /n2e4utazj34LcGpIk6aOeJ7X9GphJ9qby7bb13zIWUty3zrJWKo2K9eULfhD5/ie1io1aKGdH m1TCkyTnnM/dK05YjPMLlOXq6Xcin1eUUJcV2v8W9/k/qFqV21WDZVYmf4+TEphLIZ9Y7m9nI0 1QoTN8MLdCm4DWArfSBNohhvspmivbTowwwUMjFLq1JImRtRVloSp3FQ3WOaue22mYm659ry3y CTxE6S3eKkL7A6GWFkuGRfvNNeYCD84p9jGCI6TUydlY0q6+L9h7jDpEdDdxSS9IPI6BwaMwC2 4yA= From: Thomas Schwinge To: , Subject: Document current '-Wuninitialized' diagnostics for 'libgomp.oacc-fortran/routine-10.f90' [PR102192] In-Reply-To: <874k67ewhk.fsf@euler.schwinge.homeip.net> References: <874k67ewhk.fsf@euler.schwinge.homeip.net> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/27.1 (x86_64-pc-linux-gnu) Date: Thu, 13 Jan 2022 11:56:27 +0100 Message-ID: <871r1bewf8.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-09.mgc.mentorg.com (139.181.222.9) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, 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: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Hi! On 2022-01-13T11:55:03+0100, I wrote: > This has fallen out of (unfinished...) work earlier in the year: pushed > to master branch commit 4bd8b1e881f0c26a5103cd1919809b3d63b60ef2 > "Document current '-Wuninitialized'/'-Wmaybe-uninitialized' diagnostics > for OpenACC test cases". ..., and commit 2edbcaed95b8d8cbb05a6af486179db0da6e3245 "Document current '-Wuninitialized' diagnostics for 'libgomp.oacc-fortran/routine-10.f90' [PR102192]". Grüße Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 From 2edbcaed95b8d8cbb05a6af486179db0da6e3245 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Thu, 26 Aug 2021 16:55:21 +0200 Subject: [PATCH] Document current '-Wuninitialized' diagnostics for 'libgomp.oacc-fortran/routine-10.f90' [PR102192] libgomp/ PR tree-optimization/102192 * testsuite/libgomp.oacc-fortran/routine-10.f90: Document current '-Wuninitialized' diagnostics. --- .../testsuite/libgomp.oacc-fortran/routine-10.f90 | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/libgomp/testsuite/libgomp.oacc-fortran/routine-10.f90 b/libgomp/testsuite/libgomp.oacc-fortran/routine-10.f90 index 90cca7c1024..9290e90f970 100644 --- a/libgomp/testsuite/libgomp.oacc-fortran/routine-10.f90 +++ b/libgomp/testsuite/libgomp.oacc-fortran/routine-10.f90 @@ -1,5 +1,7 @@ ! { dg-do run } -! + +! { dg-additional-options -Wuninitialized } + module m implicit none contains @@ -26,6 +28,13 @@ contains call add_ps_routine(a, b, c) end function add_ef + ! This '-Wmaybe-uninitialized' diagnostic appears for '-O2' only; PR102192. + ! { dg-xfail-if PR102192 { *-*-* } { -O2 } } + ! There's another instance (again '-O2' only) further down, but as any number + ! of 'dg-xfail-if' only apply to the first 'dg-bogus' etc., we have no way to + ! XFAIL that other one, so we instead match all of them here (via line '0'): + ! { dg-bogus {'c' may be used uninitialized} {} { target *-*-* } 0 } + ! { TODO_dg-bogus {'c' may be used uninitialized} {} { target *-*-* } .-7 } end module m program main @@ -44,6 +53,9 @@ program main do i = 1, n if (i .eq. 4) then c_a = add_ef(a_a, b_a) + ! See above. + ! { TODO_dg-xfail-if PR102192 { *-*-* } { -O2 } } + ! { TODO_dg-bogus {'c' may be used uninitialized} {} { target *-*-* } .-3 } end if end do !$acc end parallel -- 2.34.1