From: FIRM Projekt Account Date: Tue, 25 Mar 2003 16:37:04 +0000 (+0000) Subject: added test whether constant entity belongs to description. if so the X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=6b68a38acd1e7d7804b2b84d10a5bb2bdc10d786;p=libfirm added test whether constant entity belongs to description. if so the value might not be set. [r980] --- diff --git a/ir/tr/trvrfy.c b/ir/tr/trvrfy.c index c254f765d..55ac61091 100644 --- a/ir/tr/trvrfy.c +++ b/ir/tr/trvrfy.c @@ -101,7 +101,13 @@ static int constants_on_wrong_irg(entity *ent) { return 1; } } else { - return constant_on_wrong_irg(get_atomic_ent_value(ent)); + /* Might not be set if entity belongs to a description. */ + if (get_atomic_ent_value(ent)) + return constant_on_wrong_irg(get_atomic_ent_value(ent)); + else + assert((is_class_type(get_entity_owner(ent)) && + get_class_peculiarity(get_entity_owner(ent)) == description) && + "Value in constant atomic entity not set."); } return 0; }