------- Comment #4 from spark at gcc dot gnu dot org  2007-03-12 23:46 -------
This little patch below seems to get around the problem,
though I'm not really sure this is sufficient or not.

Index: tree-cfg.c
===================================================================
--- tree-cfg.c  (revision 122871)
+++ tree-cfg.c  (working copy)
@@ -2039,7 +2039,9 @@ find_taken_edge (basic_block bb, tree va
     return find_taken_edge_switch_expr (bb, val);

   if (computed_goto_p (stmt))
-    return find_taken_edge_computed_goto (bb, TREE_OPERAND( val, 0));
+    return (TREE_CODE (val) == LABEL_EXPR)
+      ? find_taken_edge_computed_goto (bb, TREE_OPERAND(val, 0))
+      : NULL;

   gcc_unreachable ();
 }
@@ -2054,6 +2056,8 @@ find_taken_edge_computed_goto (basic_blo
   basic_block dest;
   edge e = NULL;

+  gcc_assert (TREE_CODE (val) == LABEL_EXPR);
+
   dest = label_to_block (val);
   if (dest)
     {


-- 

spark at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |spark at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30984

Reply via email to