diff options
author | Jonathan Yong <10walls@gmail.com> | 2023-01-28 16:49:27 +0000 |
---|---|---|
committer | Jonathan Yong <10walls@gmail.com> | 2023-02-11 08:27:27 +0000 |
commit | 76ab4084d033053f430c7429c2f2f3d2a76bc6b3 (patch) | |
tree | b2b087d25846f347eb6f6ca7aac275fbfb80d0ca | |
parent | d651736e10c91cd51f7f63eeecace66920dcaeeb (diff) | |
download | gcc-76ab4084d033053f430c7429c2f2f3d2a76bc6b3.zip gcc-76ab4084d033053f430c7429c2f2f3d2a76bc6b3.tar.gz gcc-76ab4084d033053f430c7429c2f2f3d2a76bc6b3.tar.bz2 |
gcc/testsuite: fix excess warnings for mingw-w64
gcc/testsuite/ChangeLog:
* c-c++-common/Wsizeof-array-div1.c: fix excess warnings.
* gcc.dg/Warray-bounds-52.c: ditto
* gcc.dg/Wstringop-overflow-62.c: ditto
* gcc.dg/attr-vector_size.c: ditto
* gcc.dg/overflow-warn-9.c: ditto
Signed-off-by: Jonathan Yong <10walls@gmail.com>
-rw-r--r-- | gcc/testsuite/c-c++-common/Wsizeof-array-div1.c | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/Warray-bounds-52.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/Wstringop-overflow-62.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/attr-vector_size.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/overflow-warn-9.c | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/gcc/testsuite/c-c++-common/Wsizeof-array-div1.c b/gcc/testsuite/c-c++-common/Wsizeof-array-div1.c index 6e01d6c..068ce01 100644 --- a/gcc/testsuite/c-c++-common/Wsizeof-array-div1.c +++ b/gcc/testsuite/c-c++-common/Wsizeof-array-div1.c @@ -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" "" { target { lp64 } } } */ - 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 { ! ilp32 } } } */ + r += sizeof (arr) / sizeof p; /* { dg-warning "expression does not compute" "" { target { ! ilp32 } } } */ 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" "" { target { lp64 } } } */ + r += sizeof (arr2) / sizeof (int); /* { dg-warning "expression does not compute" "" { target { ! ilp32 } } } */ r += sizeof (arr2) / sizeof (int *); r += sizeof (arr2) / sizeof (short *); r += sizeof (arr) / sizeof (int); diff --git a/gcc/testsuite/gcc.dg/Warray-bounds-52.c b/gcc/testsuite/gcc.dg/Warray-bounds-52.c index c7217ad..69dc15a 100644 --- a/gcc/testsuite/gcc.dg/Warray-bounds-52.c +++ b/gcc/testsuite/gcc.dg/Warray-bounds-52.c @@ -60,7 +60,7 @@ void ptr_idx_cst (void) T ( 0, (int[]){ 1 }); T (+1, (int[]){ 1 }); // { dg-warning "array subscript 1 is outside array bounds of 'int\\\[1]'" } T (INT_MIN, (int[]){ 1 }); // { dg-warning "array subscript -\[0-9\]+ is outside array bounds of 'int\\\[1]'" "lp64" { xfail ilp32 } } - T (INT_MAX, (int[]){ 1 }); // { dg-warning "array subscript \[0-9\]+ is outside array bounds of 'int\\\[1]'" "lp64" { target lp64 } } + T (INT_MAX, (int[]){ 1 }); // { dg-warning "array subscript \[0-9\]+ is outside array bounds of 'int\\\[1]'" "not-ilp32" { target { ! ilp32 } } } // { dg-warning "array subscript -1 is outside array bounds of 'int\\\[1]'" "ilp32" { target ilp32 } .-1 } T (SIZE_MAX, (int[]){ 1 }); // { dg-warning "array subscript -?\[0-9\]+ is outside array bounds of 'int\\\[1]'" } } diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-62.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-62.c index ea19aa8..d589f07 100644 --- a/gcc/testsuite/gcc.dg/Wstringop-overflow-62.c +++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-62.c @@ -41,7 +41,7 @@ void test_min (void) memset (q, 0, DIFF_MAX - 2); memset (q, 0, DIFF_MAX); // { dg-warning "writing 2147483647 bytes into a region of size 2147483646" "ilp32" { target ilp32 } .-1 } - // { dg-warning "writing 9223372036854775807 bytes into a region of size 9223372036854775806" "lp64" { target lp64 } .-2 } + // { dg-warning "writing 9223372036854775807 bytes into a region of size 9223372036854775806" "not-ilp32" { target { ! ilp32 } } .-2 } } { diff --git a/gcc/testsuite/gcc.dg/attr-vector_size.c b/gcc/testsuite/gcc.dg/attr-vector_size.c index 3f2ce88..9177e25 100644 --- a/gcc/testsuite/gcc.dg/attr-vector_size.c +++ b/gcc/testsuite/gcc.dg/attr-vector_size.c @@ -22,7 +22,7 @@ DEFVEC (extern, 30); #if __SIZEOF_SIZE_T__ > 4 -VEC (POW2 (63)) char v63; /* { dg-error "'vector_size' attribute argument value '9223372036854775808' exceeds 9223372036854775807" "LP64" { target lp64 } } */ +VEC (POW2 (63)) char v63; /* { dg-error "'vector_size' attribute argument value '9223372036854775808' exceeds 9223372036854775807" "not-ILP32" { target { ! ilp32 } } } */ #else @@ -41,7 +41,7 @@ void test_local_scope (void) #if __SIZEOF_SIZE_T__ > 4 - VEC (POW2 (63)) char v63; /* { dg-error "'vector_size' attribute argument value '9223372036854775808' exceeds 9223372036854775807" "LP64" { target lp64 } } */ + VEC (POW2 (63)) char v63; /* { dg-error "'vector_size' attribute argument value '9223372036854775808' exceeds 9223372036854775807" "not-ILP32" { target { ! ilp32 } } } */ #else diff --git a/gcc/testsuite/gcc.dg/overflow-warn-9.c b/gcc/testsuite/gcc.dg/overflow-warn-9.c index 3c41d97..57c0f17 100644 --- a/gcc/testsuite/gcc.dg/overflow-warn-9.c +++ b/gcc/testsuite/gcc.dg/overflow-warn-9.c @@ -59,7 +59,7 @@ const struct Types t1 = { .ui = UINT_MAX + 1L, /* { dg-warning "signed conversion from .long int. to .unsigned int. changes value from .4294967296. to .0." "lp64" { target lp64 } } */ .ui = UINT_MAX + 1LU, /* { dg-warning "conversion from .long unsigned int. to .unsigned int. changes value from .4294967296. to .0." "lp64" { target lp64 } } */ - .sl = LONG_MAX + 1LU, /* { dg-warning "signed conversion from .long unsigned int. to .long int. changes value from .9223372036854775808. to .-9223372036854775808." "lp64" { target lp64 } } */ + .sl = LONG_MAX + 1LU, /* { dg-warning "signed conversion from .long unsigned int. to .long int. changes value from .9223372036854775808. to .-9223372036854775808." "not-ilp32" { target { ! ilp32 } } } */ /* { dg-warning "signed conversion from .long unsigned int. to .long int. changes value from .2147483648. to .-2147483648." "ilp32" { target ilp32 } .-1 } */ .ul = ULONG_MAX + 1LU /* there should be some warning here */ }; |