diff --git a/gcc/jit/libgccjit.c b/gcc/jit/libgccjit.c index e4f17f8..95a2c02 100644 --- a/gcc/jit/libgccjit.c +++ b/gcc/jit/libgccjit.c @@ -1345,6 +1345,10 @@ gcc_jit_context_new_binary_op (gcc_jit_context *ctxt, a->get_type ()->get_debug_string (), b->get_debug_string (), b->get_type ()->get_debug_string ()); + RETURN_NULL_IF_FAIL_PRINTF1 ( + result_type->is_numeric (), ctxt, loc, + "result_type type: %s is not numeric", + result_type->get_debug_string ()); return (gcc_jit_rvalue *)ctxt->new_binary_op (loc, op, result_type, a, b); }