From: Thomas Schwinge <thomas@codesourcery.com>
To: <gcc-patches@gcc.gnu.org>, <fortran@gcc.gnu.org>
Cc: Martin Sebor <msebor@gmail.com>
Subject: Document current '-Wuninitialized' diagnostics for 'libgomp.oacc-fortran/routine-10.f90' [PR102192]
Date: Thu, 13 Jan 2022 11:56:27 +0100 [thread overview]
Message-ID: <871r1bewf8.fsf@euler.schwinge.homeip.net> (raw)
In-Reply-To: <874k67ewhk.fsf@euler.schwinge.homeip.net>
[-- Attachment #1: Type: text/plain, Size: 753 bytes --]
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Document-current-Wuninitialized-diagnostics-for-libg.patch --]
[-- Type: text/x-diff, Size: 1906 bytes --]
From 2edbcaed95b8d8cbb05a6af486179db0da6e3245 Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <thomas@codesourcery.com>
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
next prev parent reply other threads:[~2022-01-13 10:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-13 10:55 Document current '-Wuninitialized'/'-Wmaybe-uninitialized' diagnostics for OpenACC test cases Thomas Schwinge
2022-01-13 10:56 ` Thomas Schwinge [this message]
2022-01-13 16:06 ` Martin Sebor
2022-01-13 21:39 ` Thomas Schwinge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871r1bewf8.fsf@euler.schwinge.homeip.net \
--to=thomas@codesourcery.com \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=msebor@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).