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

--- Comment #5 from Alex Coplan <acoplan at gcc dot gnu.org> ---
Created attachment 48867
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48867&action=edit
Minimal reproducer

I've done some exhaustive testing of which combinations of casts are allowed.
It seems that any program of the following form is rejected with "unhandled
conversion":

T f(T x)
{
  return (T)(U)x;
}

where T and U are integral types with U being strictly wider than T.

I've attached a minimal handwritten testcase that reproduces the issue. You
should be able to substitute the values passed to t_outer and t_inner for other
types and still reproduce the issue, provided that t_outer is a strictly
narrower type than t_inner.

Reply via email to