new file mode 100644
@@ -0,0 +1,16 @@
+/* { dg-do run } */
+
+__INT32_TYPE__ a = 5, b, c, d;
+__UINT64_TYPE__ e = 20862985922;
+int main()
+{
+ __UINT32_TYPE__ f = 4294967292;
+ e = e | f;
+ c = -1 % ((~f ^ 4294967292) - (e - d));
+ b = ~-~e % ~-d;
+ if (b)
+ a = 0;
+ if (a < 1)
+ __builtin_abort();
+ return 0;
+}
@@ -4983,7 +4983,7 @@ valueized_wider_op (tree wide_type, tree op, bool allow_truncate)
/* For constants simply extend it. */
if (TREE_CODE (op) == INTEGER_CST)
- return wide_int_to_tree (wide_type, wi::to_wide (op));
+ return wide_int_to_tree (wide_type, wi::to_widest (op));
return NULL_TREE;
}