Just did a quick test. Correct myself previously. Those lines also
needs to be removed since they are XPASS now.

However the real issue is the dg-note at Line 32, that is the warning
disappeared.

diff --git a/libgomp/testsuite/libgomp.oacc-fortran/privatized-ref-2.f90 
b/libgomp/testsuite/libgomp.oacc-fortran/privatized-ref-2.f90
index 498ef70b63a..8cf79a10e8d 100644
--- a/libgomp/testsuite/libgomp.oacc-fortran/privatized-ref-2.f90
+++ b/libgomp/testsuite/libgomp.oacc-fortran/privatized-ref-2.f90
@@ -29,16 +29,10 @@ program main
   implicit none (type, external)
   integer :: j
   integer, allocatable :: A(:)
-  ! { dg-note {'a' declared here} {} { target *-*-* } .-1 }
   character(len=:), allocatable :: my_str
   character(len=15), allocatable :: my_str15

   A = [(3*j, j=1, 10)]
-  ! { dg-bogus {'a\.offset' is used uninitialized} {PR77504 etc.} { xfail 
*-*-* } .-1 }
-  ! { dg-bogus {'a\.dim\[0\]\.lbound' is used uninitialized} {PR77504 etc.} { 
xfail *-*-* } .-2 }
-  ! { dg-bogus {'a\.dim\[0\]\.ubound' is used uninitialized} {PR77504 etc.} { 
xfail *-*-* } .-3 }
-  ! { dg-bogus {'a\.dim\[0\]\.lbound' may be used uninitialized} {PR77504 
etc.} { xfail { ! __OPTIMIZE__ } } .-4 }
-  ! { dg-bogus {'a\.dim\[0\]\.ubound' may be used uninitialized} {PR77504 
etc.} { xfail { ! __OPTIMIZE__ } } .-5 }
   call foo (A, size(A))
   call bar (A)
   my_str = "1234567890"

After the change, all the tests are passed. However, is that right?

I am not familiar with either Fortran or libgomp, but the warning
like something declared here which might report variable declaration
conflict seems needed.

Thx,
Haochen

From: Jiang, Haochen
Sent: Friday, July 19, 2024 9:49 AM
To: Paul Richard Thomas <paul.richard.tho...@gmail.com>
Cc: pa...@gcc.gnu.org; gcc-regress...@gcc.gnu.org; gcc-patches@gcc.gnu.org
Subject: RE: [r15-2135 Regression] FAIL: 
libgomp.oacc-fortran/privatized-ref-2.f90 -DACC_DEVICE_TYPE_host=1 
-DACC_MEM_SHARED=1 -foffload=disable -Os at line 32 (test for warnings, line 
31) on Linux/x86_64

Hi Paul,

I suspect it is not the correct way to do that, those lines are ok since they 
are XFAIL. The problem is that specific warning test.

Thx,
Haochen

From: Paul Richard Thomas 
<paul.richard.tho...@gmail.com<mailto:paul.richard.tho...@gmail.com>>
Sent: Friday, July 19, 2024 12:28 AM
To: haochen.jiang 
<haoch...@ecsmtp.sh.intel.com<mailto:haoch...@ecsmtp.sh.intel.com>>
Cc: pa...@gcc.gnu.org<mailto:pa...@gcc.gnu.org>; 
gcc-regress...@gcc.gnu.org<mailto:gcc-regress...@gcc.gnu.org>; 
gcc-patches@gcc.gnu.org<mailto:gcc-patches@gcc.gnu.org>; Jiang, Haochen 
<haochen.ji...@intel.com<mailto:haochen.ji...@intel.com>>
Subject: Re: [r15-2135 Regression] FAIL: 
libgomp.oacc-fortran/privatized-ref-2.f90 -DACC_DEVICE_TYPE_host=1 
-DACC_MEM_SHARED=1 -foffload=disable -Os at line 32 (test for warnings, line 
31) on Linux/x86_64

Hi Haochen,

Try removing lines 37-41 since these are precisely the bogus warnings that the 
patch is meant to eliminate.

Regards

Paul

On Thu, 18 Jul 2024 at 14:38, haochen.jiang 
<haoch...@ecsmtp.sh.intel.com<mailto:haoch...@ecsmtp.sh.intel.com>> wrote:
On Linux/x86_64,

c3aa339ea50f050caf7ed2e497f5499ec2d7b9cc is the first bad commit
commit c3aa339ea50f050caf7ed2e497f5499ec2d7b9cc
Author: Paul Thomas <pa...@gcc.gnu.org<mailto:pa...@gcc.gnu.org>>
Date:   Thu Jul 18 08:51:35 2024 +0100

    Fortran: Suppress bogus used uninitialized warnings [PR108889].

caused

FAIL: libgomp.oacc-fortran/privatized-ref-2.f90 -DACC_DEVICE_TYPE_host=1 
-DACC_MEM_SHARED=1 -foffload=disable  -O0   at line 32 (test for warnings, line 
31)
FAIL: libgomp.oacc-fortran/privatized-ref-2.f90 -DACC_DEVICE_TYPE_host=1 
-DACC_MEM_SHARED=1 -foffload=disable  -O1   at line 32 (test for warnings, line 
31)
FAIL: libgomp.oacc-fortran/privatized-ref-2.f90 -DACC_DEVICE_TYPE_host=1 
-DACC_MEM_SHARED=1 -foffload=disable  -O2   at line 32 (test for warnings, line 
31)
FAIL: libgomp.oacc-fortran/privatized-ref-2.f90 -DACC_DEVICE_TYPE_host=1 
-DACC_MEM_SHARED=1 -foffload=disable  -O3 -fomit-frame-pointer -funroll-loops 
-fpeel-loops -ftracer -finline-functions   at line 32 (test for warnings, line 
31)
FAIL: libgomp.oacc-fortran/privatized-ref-2.f90 -DACC_DEVICE_TYPE_host=1 
-DACC_MEM_SHARED=1 -foffload=disable  -O3 -g   at line 32 (test for warnings, 
line 31)
FAIL: libgomp.oacc-fortran/privatized-ref-2.f90 -DACC_DEVICE_TYPE_host=1 
-DACC_MEM_SHARED=1 -foffload=disable  -Os   at line 32 (test for warnings, line 
31)

with GCC configured with

../../gcc/configure 
--prefix=/export/users/haochenj/src/gcc-bisect/master/master/r15-2135/usr 
--enable-clocale=gnu --with-system-zlib --with-demangler-in-ld 
--with-fpmath=sse --enable-languages=c,c++,fortran --enable-cet --without-isl 
--enable-libmpx x86_64-linux --disable-bootstrap

To reproduce:

$ cd {build_dir}/x86_64-linux/libgomp/testsuite && make check 
RUNTESTFLAGS="fortran.exp=libgomp.oacc-fortran/privatized-ref-2.f90 
--target_board='unix{-m32}'"
$ cd {build_dir}/x86_64-linux/libgomp/testsuite && make check 
RUNTESTFLAGS="fortran.exp=libgomp.oacc-fortran/privatized-ref-2.f90 
--target_board='unix{-m32\ -march=cascadelake}'"
$ cd {build_dir}/x86_64-linux/libgomp/testsuite && make check 
RUNTESTFLAGS="fortran.exp=libgomp.oacc-fortran/privatized-ref-2.f90 
--target_board='unix{-m64}'"
$ cd {build_dir}/x86_64-linux/libgomp/testsuite && make check 
RUNTESTFLAGS="fortran.exp=libgomp.oacc-fortran/privatized-ref-2.f90 
--target_board='unix{-m64\ -march=cascadelake}'"

(Please do not reply to this email, for question about this report, contact me 
at haochen dot jiang at intel.com<http://intel.com>.)
(If you met problems with cascadelake related, disabling AVX512F in command 
line might save that.)
(However, please make sure that there is no potential problems with AVX512.)

Reply via email to