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.cora...@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