builtin-snprintf-4.c: Adjust for ILP32.
authorMartin Sebor <msebor@redhat.com>
Mon, 17 Dec 2018 18:10:58 +0000 (18:10 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Mon, 17 Dec 2018 18:10:58 +0000 (11:10 -0700)
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/builtin-snprintf-4.c: Adjust for ILP32.

From-SVN: r267206

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/builtin-snprintf-4.c

index 8ba858b51778e7a8bb3446e89e4f23f6e2eebf26..220828db3b46834ca100e8b4f83fda750d2d9c64 100644 (file)
@@ -1,3 +1,7 @@
+2018-12-17  Martin Sebor  <msebor@redhat.com>
+
+       * gcc.dg/tree-ssa/builtin-snprintf-4.c: Adjust for ILP32.
+
 2018-12-17  Senthil Kumar Selvaraj  <senthilkumar.selvaraj@microchip.com>
 
        PR rtl-optimization/88253
index 5a6160881e3cbe84670af765879e741ed004cc4a..97a385e581da8c04208a317a992ca87b7f72efba 100644 (file)
@@ -58,7 +58,12 @@ extern void sink (int, ...);
 static const size_t imax = __INT_MAX__;
 static const size_t imaxp1 = imax + 1;
 
+#if __PTRDIFF_MAX__ == __INT_MAX__
+/* Make the test pass on ILP32 the same way it does on LP64.  */
+static const size_t dmax = __PTRDIFF_MAX__ + (size_t)1;
+#else
 static const size_t dmax = __PTRDIFF_MAX__;
+#endif
 static const size_t dmaxp1 = dmax + 1;
 
 static const size_t szmax = __SIZE_MAX__;