irverify: allow Proj mode_P for array parameters
authorMatthias Braun <matze@braunis.de>
Tue, 11 Dec 2012 12:02:35 +0000 (13:02 +0100)
committerMatthias Braun <matze@braunis.de>
Wed, 12 Dec 2012 12:07:43 +0000 (13:07 +0100)
(This really shouldn't be allowed but until lower_calls is fixed this
should at least get complex working on sparc/arm)

ir/ir/irverify.c

index 8fe4594..4ef2cad 100644 (file)
@@ -574,12 +574,13 @@ static int verify_node_Proj_Proj(const ir_node *p)
                                (proj < (int)get_method_n_params(mt)),
                                "More Projs for args than args in type", 0
                                );
-                       if ((mode_is_reference(mode)) && is_compound_type(get_method_param_type(mt, proj)))
+                       ir_type *param_type = get_method_param_type(mt, proj);
+                       if (mode_is_reference(mode) && (is_compound_type(param_type) || is_Array_type(param_type)))
                                /* value argument */ break;
 
                        if (!irg_is_constrained(get_irn_irg(pred), IR_GRAPH_CONSTRAINT_BACKEND)) {
                                ASSERT_AND_RET_DBG(
-                                               (mode == get_type_mode(get_method_param_type(mt, proj))),
+                                               (mode == get_type_mode(param_type)),
                                                "Mode of Proj from Start doesn't match mode of param type.", 0,
                                                show_proj_mode_failure(p, get_method_param_type(mt, proj));
                                                );