Using bootstrap-ubsan gcc to build mplayer shows:
tree-ssa-loop-prefetch.c:835:16: runtime error: signed integer overflow:
288230376151711743 * 64 cannot be represented in type 'long int'
Here signed und unsigned integers are mixed in a division resulting in
bogus values: (-83 + 64ULL -1) / 64ULL) ==
288230376151711743
Fixed by casting the unsigned parameter to signed.
PR tree-optimization/78598
* tree-ssa-loop-prefetch.c (ddown): Cast to signed to avoid
overflows.
From-SVN: r243113
+2016-12-01 Markus Trippelsdorf <markus@trippelsdorf.de>
+
+ PR tree-optimization/78598
+ * tree-ssa-loop-prefetch.c (ddown): Cast to signed to avoid
+ overflows.
+
2016-12-01 Markus Trippelsdorf <markus@trippelsdorf.de>
PR rtl-optimization/78596
gcc_assert (by > 0);
if (x >= 0)
- return x / by;
+ return x / (HOST_WIDE_INT) by;
else
- return (x + by - 1) / by;
+ return (x + (HOST_WIDE_INT) by - 1) / (HOST_WIDE_INT) by;
}
/* Given a CACHE_LINE_SIZE and two inductive memory references