From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1643) id 1FC53394DAC0; Thu, 13 Jan 2022 10:52:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1FC53394DAC0 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Thomas Schwinge To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-6547] Document current '-Wuninitialized' diagnostics for 'libgomp.oacc-fortran/routine-10.f90' [PR102192] X-Act-Checkin: gcc X-Git-Author: Thomas Schwinge X-Git-Refname: refs/heads/master X-Git-Oldrev: 4bd8b1e881f0c26a5103cd1919809b3d63b60ef2 X-Git-Newrev: 2edbcaed95b8d8cbb05a6af486179db0da6e3245 Message-Id: <20220113105252.1FC53394DAC0@sourceware.org> Date: Thu, 13 Jan 2022 10:52:52 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jan 2022 10:52:52 -0000 https://gcc.gnu.org/g:2edbcaed95b8d8cbb05a6af486179db0da6e3245 commit r12-6547-g2edbcaed95b8d8cbb05a6af486179db0da6e3245 Author: Thomas Schwinge Date: Thu Aug 26 16:55:21 2021 +0200 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. Diff: --- libgomp/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