diff mbox series

testsuite/102690: Only check warning for lp64 in Warray-bounds-16.C

Message ID 20220628133952.68218-1-kito.cheng@sifive.com
State New
Headers show
Series testsuite/102690: Only check warning for lp64 in Warray-bounds-16.C | expand

Commit Message

Kito Cheng June 28, 2022, 1:39 p.m. UTC
That warning won't happen on ilp32 targets, seems like Andrew Pinski
already mention that[1] before.

Verified on riscv32-unknown-elf and riscv64-unknown-elf.

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92879#c1

gcc/testsuite/ChangeLog:

	PR testsuite/102690
	* g++.dg/warn/Warray-bounds-16.C: XFAIL only on lp64 for the
	warning.
---
 gcc/testsuite/g++.dg/warn/Warray-bounds-16.C | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Richard Biener June 29, 2022, 9 a.m. UTC | #1
On Tue, 28 Jun 2022, Kito Cheng wrote:

> That warning won't happen on ilp32 targets, seems like Andrew Pinski
> already mention that[1] before.
> 
> Verified on riscv32-unknown-elf and riscv64-unknown-elf.
> 
> [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92879#c1

OK

> gcc/testsuite/ChangeLog:
> 
> 	PR testsuite/102690
> 	* g++.dg/warn/Warray-bounds-16.C: XFAIL only on lp64 for the
> 	warning.
> ---
>  gcc/testsuite/g++.dg/warn/Warray-bounds-16.C | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C b/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C
> index 89cbadb91c7..45a14b19ea3 100644
> --- a/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C
> +++ b/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C
> @@ -19,7 +19,7 @@ struct S
>      p = (int*) new unsigned char [sizeof (int) * m];
>  
>      for (int i = 0; i < m; i++)
> -      new (p + i) int (); /* { dg-bogus "bounds" "pr102690" { xfail *-*-* } } */
> +      new (p + i) int (); /* { dg-bogus "bounds" "pr102690" { xfail lp64 } } */
>    }
>  };
>  
>
Kito Cheng June 30, 2022, 2:16 a.m. UTC | #2
Committed to trunk, thanks :)

Is it OK for gcc-11 and gcc-12 branches?

On Wed, Jun 29, 2022 at 5:00 PM Richard Biener <rguenther@suse.de> wrote:
>
> On Tue, 28 Jun 2022, Kito Cheng wrote:
>
> > That warning won't happen on ilp32 targets, seems like Andrew Pinski
> > already mention that[1] before.
> >
> > Verified on riscv32-unknown-elf and riscv64-unknown-elf.
> >
> > [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92879#c1
>
> OK
>
> > gcc/testsuite/ChangeLog:
> >
> >       PR testsuite/102690
> >       * g++.dg/warn/Warray-bounds-16.C: XFAIL only on lp64 for the
> >       warning.
> > ---
> >  gcc/testsuite/g++.dg/warn/Warray-bounds-16.C | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C b/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C
> > index 89cbadb91c7..45a14b19ea3 100644
> > --- a/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C
> > +++ b/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C
> > @@ -19,7 +19,7 @@ struct S
> >      p = (int*) new unsigned char [sizeof (int) * m];
> >
> >      for (int i = 0; i < m; i++)
> > -      new (p + i) int (); /* { dg-bogus "bounds" "pr102690" { xfail *-*-* } } */
> > +      new (p + i) int (); /* { dg-bogus "bounds" "pr102690" { xfail lp64 } } */
> >    }
> >  };
> >
> >
>
> --
> Richard Biener <rguenther@suse.de>
> SUSE Software Solutions Germany GmbH, Frankenstra
Richard Biener June 30, 2022, 6:52 a.m. UTC | #3
On Thu, Jun 30, 2022 at 4:17 AM Kito Cheng <kito.cheng@sifive.com> wrote:
>
> Committed to trunk, thanks :)
>
> Is it OK for gcc-11 and gcc-12 branches?

Yes, if the same failure is corrected there

> On Wed, Jun 29, 2022 at 5:00 PM Richard Biener <rguenther@suse.de> wrote:
> >
> > On Tue, 28 Jun 2022, Kito Cheng wrote:
> >
> > > That warning won't happen on ilp32 targets, seems like Andrew Pinski
> > > already mention that[1] before.
> > >
> > > Verified on riscv32-unknown-elf and riscv64-unknown-elf.
> > >
> > > [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92879#c1
> >
> > OK
> >
> > > gcc/testsuite/ChangeLog:
> > >
> > >       PR testsuite/102690
> > >       * g++.dg/warn/Warray-bounds-16.C: XFAIL only on lp64 for the
> > >       warning.
> > > ---
> > >  gcc/testsuite/g++.dg/warn/Warray-bounds-16.C | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C b/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C
> > > index 89cbadb91c7..45a14b19ea3 100644
> > > --- a/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C
> > > +++ b/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C
> > > @@ -19,7 +19,7 @@ struct S
> > >      p = (int*) new unsigned char [sizeof (int) * m];
> > >
> > >      for (int i = 0; i < m; i++)
> > > -      new (p + i) int (); /* { dg-bogus "bounds" "pr102690" { xfail *-*-* } } */
> > > +      new (p + i) int (); /* { dg-bogus "bounds" "pr102690" { xfail lp64 } } */
> > >    }
> > >  };
> > >
> > >
> >
> > --
> > Richard Biener <rguenther@suse.de>
> > SUSE Software Solutions Germany GmbH, Frankenstra
diff mbox series

Patch

diff --git a/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C b/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C
index 89cbadb91c7..45a14b19ea3 100644
--- a/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C
+++ b/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C
@@ -19,7 +19,7 @@  struct S
     p = (int*) new unsigned char [sizeof (int) * m];
 
     for (int i = 0; i < m; i++)
-      new (p + i) int (); /* { dg-bogus "bounds" "pr102690" { xfail *-*-* } } */
+      new (p + i) int (); /* { dg-bogus "bounds" "pr102690" { xfail lp64 } } */
   }
 };