]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite/102690: Only check warning for lp64 in Warray-bounds-16.C
authorKito Cheng <kito.cheng@sifive.com>
Tue, 28 Jun 2022 10:43:42 +0000 (18:43 +0800)
committerKito Cheng <kito.cheng@sifive.com>
Thu, 30 Jun 2022 02:14:55 +0000 (10:14 +0800)
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

index 89cbadb91c7b91fb8422624ec2454d0e60768b77..45a14b19ea3d5dbd522b03afdc1d25f58d56af68 100644 (file)
@@ -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 } } */
   }
 };