From: Martin Sebor Date: Tue, 3 Aug 2021 19:53:02 +0000 (-0600) Subject: Disable a test case in ILP32 [PR101688]. X-Git-Tag: basepoints/gcc-13~5606 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aabf07cd5dc314135adde89830a86be157d7596b;p=thirdparty%2Fgcc.git 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. --- diff --git a/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C b/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C index 121239ac1dbc..c80977d3043a 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]);