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

--- Comment #11 from Andrew Macleod <amacleod at redhat dot com> ---
(In reply to Martin Jambor from comment #9)
> A buildbot run which checked out this revision unfortunately still reports
> this problem with UBSAN-bootstrapped compiler.

Actually, I do not think that range_cast is the root problem upon further
review... Discussing it with Aldy, I think there is a typo in the code:

  value_range resvr = vr;
  range_cast (resvr, param_type);

That should be

  Value_Range resvr = vr;
  range_cast (resvr, param_type);

value_range is the legacy int_range (which should be going away this release)
and Value_Range is the new range type that supports multiple ranges, including
unsupported ranges for UNDEFINED and VARYING.

So the set_varying call in range_cast is trying to cast the integer to a
different class which isnt supported by int_range.

BUt then, i see that ipa_set_jfunc_vr (jfunc, &resvr); is expecting a
value_range *, so perhapsd this is really a can of worms.  we're checking that
arg is an irange supported, we should also perhaps just check that param_type
is too...

Reply via email to