From: Michael Beck Date: Thu, 21 Jun 2007 12:31:57 +0000 (+0000) Subject: do not emit stabs for array types with unknown bounds X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=b485ffb7624e476b0dc33124b9af6986510a5c8e;p=libfirm do not emit stabs for array types with unknown bounds [r14682] --- diff --git a/ir/be/bestabs.c b/ir/be/bestabs.c index 1d27373ac..f08586a35 100644 --- a/ir/be/bestabs.c +++ b/ir/be/bestabs.c @@ -341,11 +341,14 @@ static void gen_array_type(wenv_t *env, ir_type *tp) { for (i = 0; i < n; ++i) { int dim = perm[i]; - long min = get_array_lower_bound_int(tp, dim); - long max = get_array_upper_bound_int(tp, dim); - /* FIXME r1 must be integer type, but seems to work for now */ - fprintf(h->f, "r1;%ld;%ld;", min, max-1); + if (is_Const(get_array_lower_bound(tp, dim)) && is_Const(get_array_upper_bound(tp, dim))) { + long min = get_array_lower_bound_int(tp, dim); + long max = get_array_upper_bound_int(tp, dim); + + /* FIXME r1 must be integer type, but seems to work for now */ + fprintf(h->f, "r1;%ld;%ld;", min, max-1); + } } type_num = get_type_number(h, etp);