From: Matthias Braun Date: Tue, 6 Sep 2011 14:16:24 +0000 (+0200) Subject: sparc: panic instead of segfault for struct parameters X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=595a5d410e24d1ecb517de36a29282bb2ac64eff;p=libfirm sparc: panic instead of segfault for struct parameters --- diff --git a/ir/be/sparc/sparc_cconv.c b/ir/be/sparc/sparc_cconv.c index 5e4c648be..d1b38f67e 100644 --- a/ir/be/sparc/sparc_cconv.c +++ b/ir/be/sparc/sparc_cconv.c @@ -199,9 +199,16 @@ calling_convention_t *sparc_decide_calling_convention(ir_type *function_type, for (i = 0; i < n_params; ++i) { ir_type *param_type = get_method_param_type(function_type,i); - ir_mode *mode = get_type_mode(param_type); - int bits = get_mode_size_bits(mode); - reg_or_stackslot_t *param = ¶ms[i]; + ir_mode *mode; + int bits; + reg_or_stackslot_t *param; + + if (is_compound_type(param_type)) + panic("sparc: compound arguments not supported yet"); + + mode = get_type_mode(param_type); + bits = get_mode_size_bits(mode); + param = ¶ms[i]; if (i == 0 && (get_method_calling_convention(function_type) & cc_compound_ret)) {