@@ -1284,13 +1284,16 @@ ranger_cache::block_range (vrange &r, ba
gimple *def_stmt = SSA_NAME_DEF_STMT (name);
basic_block def_bb = NULL;
if (def_stmt)
- def_bb = gimple_bb (def_stmt);;
+ def_bb = gimple_bb (def_stmt);
if (!def_bb)
{
// If we get to the entry block, this better be a default def
// or range_on_entry was called for a block not dominated by
- // the def.
- gcc_checking_assert (SSA_NAME_IS_DEFAULT_DEF (name));
+ // the def. But it could be also SSA_NAME defined by a statement
+ // not yet in the IL (such as queued edge insertion), in that case
+ // just punt.
+ if (!SSA_NAME_IS_DEFAULT_DEF (name))
+ return false;
def_bb = ENTRY_BLOCK_PTR_FOR_FN (cfun);
}
@@ -0,0 +1,20 @@
+/* PR middle-end/116898 */
+/* { dg-do compile { target bitint575 } } */
+/* { dg-options "-O -finstrument-functions -fnon-call-exceptions" } */
+
+_BitInt(127) a;
+_BitInt(511) b;
+
+void
+foo (_BitInt(31) c)
+{
+ do
+ {
+ c %= b;
+again:
+ }
+ while (c);
+ a /= 0; /* { dg-warning "division by zero" } */
+ c -= a;
+ goto again;
+}