diff options
author | Martin Sebor <msebor@redhat.com> | 2021-08-03 13:53:02 -0600 |
---|---|---|
committer | Martin Sebor <msebor@redhat.com> | 2021-08-03 13:56:56 -0600 |
commit | aabf07cd5dc314135adde89830a86be157d7596b (patch) | |
tree | 1c15b19e51ab1276cd2e05e0e7df381e857e942e /gcc | |
parent | 0f44b097321c42ba8f9301f369a9799424aa6d46 (diff) | |
download | gcc-aabf07cd5dc314135adde89830a86be157d7596b.zip gcc-aabf07cd5dc314135adde89830a86be157d7596b.tar.gz gcc-aabf07cd5dc314135adde89830a86be157d7596b.tar.bz2 |
Disable a test case in ILP32 [PR101688].
Resolves:
PR testsuite/101688 - g++.dg/warn/Wstringop-overflow-4.C fails on 32-bit archs with new jump threader
gcc/testsuite:
PR testsuite/101688
* g++.dg/warn/Wstringop-overflow-4.C: Disable a test case in ILP32.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C b/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C index 121239a..c80977d 100644 --- a/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C +++ b/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C @@ -145,7 +145,12 @@ void test_strcpy_new_int16_t (size_t n, const size_t vals[]) T (S (9), new int16_t[r_imin_imax * 2 + 1]); int r_0_imax = SR (0, INT_MAX); - T (S (1), new int16_t[r_0_imax]); + + if (sizeof (int) < sizeof (size_t)) + /* The code below might emit a warning when int is the same size + as size_t as a result of threading. See PR 101688 comment #2. */ + T (S (1), new int16_t[r_0_imax]); + T (S (2), new int16_t[r_0_imax + 1]); T (S (9), new int16_t[r_0_imax * 2 + 1]); |