tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the goto_locus of each...
authorEric Botcazou <ebotcazou@adacore.com>
Thu, 28 Jun 2018 14:49:15 +0000 (14:49 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Thu, 28 Jun 2018 14:49:15 +0000 (14:49 +0000)
* tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
goto_locus of each outgoing edge of each basic block.

From-SVN: r262219

gcc/ChangeLog
gcc/tree-cfg.c

index 45c45c4..9dcb8bd 100644 (file)
@@ -1,3 +1,8 @@
+2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
+       goto_locus of each outgoing edge of each basic block.
+
 2018-06-28  Richard Biener  <rguenther@suse.de>
 
        * dwarf2out.c (decl_scope_table): Remove.
index a22fed5..14d66b7 100644 (file)
@@ -5286,6 +5286,8 @@ verify_gimple_in_cfg (struct function *fn, bool verify_nothrow)
   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 *fn, bool verify_nothrow)
            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);