testsuite: Fix -Wsizeof-array-div tests.
gcc/testsuite/ChangeLog: * c-c++-common/Wsizeof-array-div1.c: Expect certain warnings on lp64 targets only. * g++.dg/warn/Wsizeof-array-div2.C: Only run on lp64 targets.
This commit is contained in:
parent
67f3791f7d
commit
d835608f05
2 changed files with 4 additions and 4 deletions
|
@ -13,12 +13,12 @@ fn (int ap[])
|
|||
int r = 0;
|
||||
|
||||
r += sizeof (arr) / sizeof (*arr);
|
||||
r += sizeof (arr) / sizeof (p); /* { dg-warning "expression does not compute" } */
|
||||
r += sizeof (arr) / sizeof p; /* { dg-warning "expression does not compute" } */
|
||||
r += sizeof (arr) / sizeof (p); /* { dg-warning "expression does not compute" "" { target { lp64 } } } */
|
||||
r += sizeof (arr) / sizeof p; /* { dg-warning "expression does not compute" "" { target { lp64 } } } */
|
||||
r += sizeof (arr) / (sizeof p);
|
||||
r += sizeof (arr) / (sizeof (p));
|
||||
r += sizeof (arr2) / sizeof p;
|
||||
r += sizeof (arr2) / sizeof (int); /* { dg-warning "expression does not compute" } */
|
||||
r += sizeof (arr2) / sizeof (int); /* { dg-warning "expression does not compute" "" { target { lp64 } } } */
|
||||
r += sizeof (arr2) / sizeof (int *);
|
||||
r += sizeof (arr2) / sizeof (short *);
|
||||
r += sizeof (arr) / sizeof (int);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// PR c++/91741
|
||||
// { dg-do compile }
|
||||
// { dg-do compile { target { lp64 } } }
|
||||
// { dg-options "-Wall" }
|
||||
// From <https://www.viva64.com/en/examples/v706/>.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue