@@ -997,9 +997,7 @@ update_list::pop ()
ranger_cache::ranger_cache (int not_executable_flag, bool use_imm_uses)
{
- m_workback.create (0);
- m_workback.safe_grow_cleared (last_basic_block_for_fn (cfun));
- m_workback.truncate (0);
+ m_workback = vNULL;
m_temporal = new temporal_cache;
// If DOM info is available, spawn an oracle as well.
@@ -1560,7 +1558,7 @@ ranger_cache::fill_block_cache (tree nam
// Visit each block back to the DEF. Initialize each one to UNDEFINED.
// m_visited at the end will contain all the blocks that we needed to set
// the range_on_entry cache for.
- m_workback.quick_push (bb);
+ m_workback.safe_push (bb);
undefined.set_undefined ();
m_on_entry.set_bb_range (name, bb, undefined);
gcc_checking_assert (m_update->empty_p ());
@@ -1634,7 +1632,7 @@ ranger_cache::fill_block_cache (tree nam
// the list.
gcc_checking_assert (!m_on_entry.bb_range_p (name, pred));
m_on_entry.set_bb_range (name, pred, undefined);
- m_workback.quick_push (pred);
+ m_workback.safe_push (pred);
}
}
@@ -1729,7 +1727,7 @@ ranger_cache::range_from_dom (vrange &r,
// This block has an outgoing range.
if (gori ().has_edge_range_p (name, bb))
- m_workback.quick_push (prev_bb);
+ m_workback.safe_push (prev_bb);
else
{
// Normally join blocks don't carry any new range information on
@@ -1753,7 +1751,7 @@ ranger_cache::range_from_dom (vrange &r,
break;
}
if (all_dom)
- m_workback.quick_push (prev_bb);
+ m_workback.safe_push (prev_bb);
}
}
@@ -0,0 +1,16 @@
+/* PR middle-end/116899 */
+/* { dg-do compile { target bitint575 } } */
+/* { dg-options "-O2" } */
+
+float f;
+_BitInt(255) b;
+
+void
+foo (signed char c)
+{
+ for (;;)
+ {
+ c %= (unsigned _BitInt(512)) 0; /* { dg-warning "division by zero" } */
+ f /= b >= c;
+ }
+}