Hi,

I just noticed an error in a part of the code that I converted, that
looks this way:

switch (gimple_assign_subcode (stmt))
{
  case SSA_NAME:
    handle_ssa_name ();
    break;

  case PLUS_EXPR:
    handle_plus ();
    break;

  default:
    something ();
}

The problem of course is that for GIMPLE_SINGLE_RHS, we do not maintain
the invariant that

gimple_assign_subcode (stmt) == TREE_CODE (gimple_assign_rhs1 (stmt)),

so gimple_assign_subcode typically will not be SSA_NAME, but VAR_DECL.
Enforcing this invariant might be hard and probably asking for more
trouble than it is worth.  However, perhaps it would make sense 
to use some special tree code to indicate GIMPLE_SINGLE_RHS, in order
to avoid confusion?

Zdenek

Reply via email to