> Related we're also missing to verify_location () on those in
> verify_gimple_in_cfg. Having stale references to GCed BLOCKs
> via locations can be difficult to track down...
>
> So can you add the verification bits as well?
Like this?
* tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
goto_locus of each outgoing edge of each basic block.
--
Eric Botcazou
Index: tree-cfg.c
===================================================================
--- tree-cfg.c (revision 262207)
+++ tree-cfg.c (working copy)
@@ -5286,6 +5286,8 @@ verify_gimple_in_cfg (struct function *f
FOR_EACH_BB_FN (bb, fn)
{
gimple_stmt_iterator gsi;
+ edge_iterator ei;
+ edge e;
for (gphi_iterator gpi = gsi_start_phis (bb);
!gsi_end_p (gpi);
@@ -5407,6 +5409,10 @@ verify_gimple_in_cfg (struct function *f
debug_gimple_stmt (stmt);
err |= err2;
}
+
+ FOR_EACH_EDGE (e, ei, bb->succs)
+ if (e->goto_locus != UNKNOWN_LOCATION)
+ err |= verify_location (&blocks, e->goto_locus);
}
hash_map<gimple *, int> *eh_table = get_eh_throw_stmt_table (cfun);