From: Andreas Zwinkau Date: Wed, 20 Apr 2011 11:33:06 +0000 (+0200) Subject: Handle chains of lowerings correctly X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=6522e38f03a92510c47b7d690a284545086f1f55;p=libfirm Handle chains of lowerings correctly --- diff --git a/ir/tr/type.c b/ir/tr/type.c index 85d96e08a..6d4f52fc7 100644 --- a/ir/tr/type.c +++ b/ir/tr/type.c @@ -2100,6 +2100,10 @@ void set_lowered_type(ir_type *tp, ir_type *lowered_type) { assert(is_type(tp) && is_type(lowered_type)); lowered_type->flags |= tf_lowered_type; + /* there might be a chain of lowerings, get to the start */ + while (is_lowered_type(tp)) { + tp = tp->assoc_type; + } tp->assoc_type = lowered_type; lowered_type->assoc_type = tp; }