[PATCH][gcc] libgccjit: check result_type in gcc_jit_context_new_binary_op
David Malcolm
dmalcolm@redhat.com
Tue Jan 1 00:00:00 GMT 2019
On Mon, 2019-06-10 at 09:15 +0000, Andrea Corallo wrote:
> Hi all,
> I would like to propose this patch to check for the return type of
> binary operators to be a numeric type.
> Not doing so can lead the compiler into funny crashes.
>
> Does not introduce regressions running make check-jit.
>
> OK for trunk?
>
> Bests
> Andrea
>
> 2019-06-09 Andrea Corallo andrea.corallo@arm.com
>
> * libgccjit.c (gcc_jit_context_new_binary_op): Check result_type to
> be a
> numeric type.
Thanks for this patch. Please can you add a test case that triggers
the error-handling case? (I'm trying to imagine a situation where this
could have happened).
See gcc/testsuite/jit.dg/test-error-new-binary-op-bad-op.c or similar.
Dave
More information about the Jit
mailing list