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

--- Comment #5 from Andrew Macleod <amacleod at redhat dot com> ---
  uc_1.0_1 = uc_1;
  _2 = (int) uc_1.0_1;    
  _3 = 211 - _2;

_3 evaluates as 211 - [-128, 127], or [84, 339]

  _4 = _3 > 0;
  _5 = (int) _4;
  func_12_uli_6 = _5;
  i_4.1_6 = i_4;
  _7 = i_4.1_6 % 0;

We changed it so that anything mod 0 was undefined.  so _7 is UNDEFINED.
  i_4 = _7;
  _11 = _3 > 0;

_3 i s[84, 339] meaning _11 always evaluates TRUE.

  _10 = _11 ? _7 : 0;

The code for COND_EXPR confirms the types match when it folds. In this case,
the result is UNDEFINED.. undefined has no type, so we need to add a check for
that.

Reply via email to