[Bug tree-optimization/103596] [9/10/11/12 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at gimple-expr.c:88 since r8-565-g7581ce9a1ad6df9c

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Dec 7 10:12:18 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103596

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
So the issue is that we value number

 _3(ab) = -1;
 switch (_3(ab))
  {
  }

in a way to determine the known executable edge but later do not force
propagation into the switch and may_propagate_copy disallows propagating
into the abnormal SSA name.  This is because of

  /* Similarly if DEST flows in from an abnormal edge then the copy cannot be
     propagated.  */
  else if (TREE_CODE (dest) == SSA_NAME
           && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (dest))
    return false;

which is overly restrictive if the propagation does not happen into a PHI
argument on an abnormal edge.

Testing a fix.


More information about the Gcc-bugs mailing list