From b485ffb7624e476b0dc33124b9af6986510a5c8e Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Thu, 21 Jun 2007 12:31:57 +0000 Subject: [PATCH] do not emit stabs for array types with unknown bounds [r14682] --- ir/be/bestabs.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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); -- 2.20.1