Hi,

According to the CVS annotate of tree-if-conv.c, Devang Patel checked
in the following code in tree_if_convert_stmt.

    case GOTO_EXPR:
      /* Unconditional goto */
      add_to_predicate_list (bb_for_stmt (TREE_OPERAND (t, 1)), cond);

Note that TREE_OPERAND (t, 1) seems wrong.  A GOTO_EXPR takes only one
operand.  I am pretty sure this part of the code has never been run
because if it had been, then the compiler would have ICEd by now.

Now, what would be the right fix here?  Something like this?

  case GOTO_EXPR:
    break;

As far as I know, all jumps except computed gotos are are implicitly
represented by the CFG.  I don't think the if-conv is trying to handle
computed gotos here.

By the way, this problem has been filed as PR 18472.

Kazu Hirata

Reply via email to