wide-int_plugin.c (test_double_int_round_udiv): Avoid narrowing error.
authorJason Merrill <jason@redhat.com>
Fri, 3 Jul 2015 14:42:21 +0000 (10:42 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 3 Jul 2015 14:42:21 +0000 (10:42 -0400)
* gcc.dg/plugin/wide-int_plugin.c (test_double_int_round_udiv):
Avoid narrowing error.

From-SVN: r225383

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/plugin/wide-int_plugin.c

index 493b730a559b2bd84697dc776cc89f8ee9ad46ae..598918e3c73c07a01fcc819863b8a2af35436725 100644 (file)
@@ -1,3 +1,8 @@
+2015-07-03  Jason Merrill  <jason@redhat.com>
+
+       * gcc.dg/plugin/wide-int_plugin.c (test_double_int_round_udiv):
+       Avoid narrowing error.
+
 2015-07-03  Segher Boessenkool  <segher@kernel.crashing.org>
 
        PR rtl-optimization/66706
index b20ee2803542fe817647fb9d8760e9d41d5d74cc..17604c8cf991dc14aa3199c2d72b109c846e98b3 100644 (file)
@@ -10,8 +10,8 @@ static void
 test_double_int_round_udiv (void)
 {
   double_int dmin = { 0, HOST_WIDE_INT_MIN };
-  double_int dmax = { -1, HOST_WIDE_INT_MAX };
-  double_int dnegone = { -1, -1 };
+  double_int dmax = { (unsigned HOST_WIDE_INT)-1, HOST_WIDE_INT_MAX };
+  double_int dnegone = { (unsigned HOST_WIDE_INT)-1, -1 };
   double_int mod, div;
   div = dmin.udivmod (dnegone, ROUND_DIV_EXPR, &mod);
   if (div.low != 1 || div.high != 0