+2015-01-15 David Malcolm <dmalcolm@redhat.com>
+
+ * libgccjit.c (gcc_jit_block_add_assignment_op): Check that the
+ lvalue and the rvalue are of compatible type.
+
2015-01-13 David Malcolm <dmalcolm@redhat.com>
* docs/cp/topics/contexts.rst (Debugging): Add
"unrecognized value for enum gcc_jit_binary_op: %i",
op);
RETURN_IF_FAIL (rvalue, ctxt, loc, "NULL rvalue");
+ RETURN_IF_FAIL_PRINTF4 (
+ compatible_types (lvalue->get_type (),
+ rvalue->get_type ()),
+ ctxt, loc,
+ "mismatching types:"
+ " assignment to %s (type: %s) involving %s (type: %s)",
+ lvalue->get_debug_string (),
+ lvalue->get_type ()->get_debug_string (),
+ rvalue->get_debug_string (),
+ rvalue->get_type ()->get_debug_string ());
gcc::jit::recording::statement *stmt = block->add_assignment_op (loc, lvalue, op, rvalue);
+2015-01-15 David Malcolm <dmalcolm@redhat.com>
+
+ * jit.dg/test-error-mismatching-types-in-assignment-op.c: New
+ test case.
+
2015-01-15 Mike Stump <mikestump@comcast.net>
* gcc.dg/inline_1.c: Rename gcc.dg/inline_[1-4].c to inline-3[6-9].c.