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

2024-07-18 Thread Paul Richard Thomas via Gcc-regression
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 
wrote:

> On Linux/x86_64,
>
> c3aa339ea50f050caf7ed2e497f5499ec2d7b9cc is the first bad commit
> commit c3aa339ea50f050caf7ed2e497f5499ec2d7b9cc
> Author: Paul Thomas 
> 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.)
> (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.)
>


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

2024-07-19 Thread Paul Richard Thomas via Gcc-regression
Hi Haochen,

Thanks for doing that test. Here is what the error looks like on 14-branch:
libgomp.oacc-fortran/privatized-ref-2.f90:36:22:
   36 |   A = [(3*j, j=1, 10)]
  |  ^
Warning: ‘a.offset’ is used uninitialized [-Wuninitialized]
libgomp.oacc-fortran/privatized-ref-2.f90:31:30:
   31 |   integer, allocatable :: A(:)
  |  ^
note: ‘a’ declared here
libgomp.oacc-fortran/privatized-ref-2.f90:36:22:
repeats for the descriptor bounds.

The scalarizer, which sets up the loops for the assignment of 'A' assigns
the bounds and offset to variables. These are then manipulated further and
used for the loop bounds and allocation. The patch does a once off setting
of the bounds, to eliminate the bogus warnings. The allocate statement
already does this.

I will patch appropriately just as soon as I am able.

Thanks again

Paul


On Fri, 19 Jul 2024 at 02:59, Jiang, Haochen 
wrote:

> 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 
> *Cc:* pa...@gcc.gnu.org; gcc-regression@gcc.gnu.org;
> gcc-patc...@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 
> *Sent:* Friday, July 19, 2024 12:28 AM
> *To:* haochen.jiang 
> *Cc:* pa...@gcc.gnu.org; gcc-regression@gcc.gnu.org;
> gcc-patc...@gcc.gnu.org; Jiang, Haochen 
> *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 
> wrote:
>
> On Linux/x86_64,
>
> c3aa339ea50f050caf7ed2e497f5499ec2d7b9cc is the first bad commit
> commit c3aa339ea50f050caf7ed2e497f5499ec2d7b9cc
> Author: Paul Thomas 
> 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

Re: [r15-6415 Regression] FAIL: gfortran.dg/coarray_lib_comm_1.f90 -Os scan-tree-dump-times original "_gfortran_caf_get_by_ct \\(caf_token.., 0B, 0B, 1, \\(unsigned long\\) atmp.[0-9]+.span" 4 on Linu

2024-12-23 Thread Paul Richard Thomas via Gcc-regression
Hi Andre,

It looks good to me.

Thanks

Paul


On Mon, 23 Dec 2024 at 14:58, Andre Vehreschild  wrote:

> Hi all,
>
> I did an ooppsie with the patch for 107635. Attached is a patch that fixes
> this. Essentially the regexp was to complicated for what was needed. So
> now we
> just count the number of occurrences of caf_get_by_ct, which has to be
> four.
>
> Regtests ok on x86_64-pc-linux-gnu. Ok for mainline?
>
> Regards,
> Andre
>
> On Mon, 23 Dec 2024 04:52:50 +0800
> "haochen.jiang"  wrote:
>
> > On Linux/x86_64,
> >
> > 586477d67bf2e320e8ec41f82b194259c1dcc43a is the first bad commit
> > commit 586477d67bf2e320e8ec41f82b194259c1dcc43a
> > Author: Andre Vehreschild 
> > Date:   Fri Dec 6 08:57:34 2024 +0100
> >
> > Fortran: Replace getting of coarray data with accessor-based version.
> > [PR107635]
> >
> > caused
> >
> > FAIL: gfortran.dg/coarray_lib_comm_1.f90   -O0   scan-tree-dump-times
> > original "_gfortran_caf_get_by_ct \\(caf_token.., 0B, 0B, 1, \\(unsigned
> > long\\) atmp.[0-9]+.span" 4 FAIL: gfortran.dg/coarray_lib_comm_1.f90
>  -O1
> > scan-tree-dump-times original "_gfortran_caf_get_by_ct \\(caf_token..,
> 0B,
> > 0B, 1, \\(unsigned long\\) atmp.[0-9]+.span" 4 FAIL:
> > gfortran.dg/coarray_lib_comm_1.f90   -O2   scan-tree-dump-times original
> > "_gfortran_caf_get_by_ct \\(caf_token.., 0B, 0B, 1, \\(unsigned long\\)
> > atmp.[0-9]+.span" 4 FAIL: gfortran.dg/coarray_lib_comm_1.f90   -O3
> > -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer
> -finline-functions
> >  scan-tree-dump-times original "_gfortran_caf_get_by_ct \\(caf_token..,
> 0B,
> > 0B, 1, \\(unsigned long\\) atmp.[0-9]+.span" 4 FAIL:
> > gfortran.dg/coarray_lib_comm_1.f90   -O3 -g   scan-tree-dump-times
> original
> > "_gfortran_caf_get_by_ct \\(caf_token.., 0B, 0B, 1, \\(unsigned long\\)
> > atmp.[0-9]+.span" 4 FAIL: gfortran.dg/coarray_lib_comm_1.f90   -Os
> > scan-tree-dump-times original "_gfortran_caf_get_by_ct \\(caf_token..,
> 0B,
> > 0B, 1, \\(unsigned long\\) atmp.[0-9]+.span" 4
> >
> > with GCC configured with
> >
> > ../../gcc/configure
> > --prefix=/export/users/haochenj/src/gcc-bisect/master/master/r15-6415/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}/gcc && make check
> > RUNTESTFLAGS="dg.exp=gfortran.dg/coarray_lib_comm_1.f90
> > --target_board='unix{-m32}'" $ cd {build_dir}/gcc && make check
> > RUNTESTFLAGS="dg.exp=gfortran.dg/coarray_lib_comm_1.f90
> > --target_board='unix{-m32\ -march=cascadelake}'"
> >
> > (Please do not reply to this email, for question about this report,
> contact
> > me at haochen dot jiang at 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.)
>
>
> --
> Andre Vehreschild * Email: vehre ad gmx dot de
>