]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Disable a test case in ILP32 [PR101688].
authorMartin Sebor <msebor@redhat.com>
Tue, 3 Aug 2021 19:53:02 +0000 (13:53 -0600)
committerMartin Sebor <msebor@redhat.com>
Tue, 3 Aug 2021 19:56:56 +0000 (13:56 -0600)
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.

gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C

index 121239ac1dbc7c3fd2ad38712de9387d28ba8976..c80977d3043a0224f8b388dbaeffb6f971728245 100644 (file)
@@ -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]);