[Bug jit/95498] unhandled conversion

bouanto at zoho dot com gcc-bugzilla@gcc.gnu.org
Mon Jul 13 10:39:45 GMT 2020


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

--- Comment #6 from Antoni <bouanto at zoho dot com> ---
(In reply to Alex Coplan from comment #5)
> Created attachment 48867 [details]
> 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.

Yeah, that's what I figured out.

I sent a patch:
https://gcc.gnu.org/pipermail/jit/2020q3/001228.html

I'd like to have a review of it.


More information about the Gcc-bugs mailing list