X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Ftr%2Ftrvrfy.c;h=d3024a3317080c21dde3463f3eced5c6b1563d3d;hb=f2edb6301aa7affb0673e76436d9b4dbaef6b9e1;hp=81d4c03f500eaeb89df4629211da8ec556fbde79;hpb=b2e280bcb4dcde092a0971ea045ee1269b114c4f;p=libfirm diff --git a/ir/tr/trvrfy.c b/ir/tr/trvrfy.c index 81d4c03f5..d3024a331 100644 --- a/ir/tr/trvrfy.c +++ b/ir/tr/trvrfy.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved. + * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. * * This file is part of libFirm. * @@ -311,10 +311,12 @@ static int constants_on_wrong_irg(ir_entity *ent) { if (get_entity_variability(ent) == variability_uninitialized) return 0; if (is_compound_entity(ent)) { - int i; - for (i = get_compound_ent_n_values(ent) - 1; i >= 0; --i) { - if (constant_on_wrong_irg(get_compound_ent_value(ent, i))) - return 1; + if(!ent->has_initializer) { + int i; + for (i = get_compound_ent_n_values(ent) - 1; i >= 0; --i) { + if (constant_on_wrong_irg(get_compound_ent_value(ent, i))) + return 1; + } } } else { /* Might not be set if entity belongs to a description or is external allocated. */ @@ -415,14 +417,14 @@ int check_entity(ir_entity *ent) { /* * check types and entities */ -static void check_tore(type_or_ent *tore, void *env) { +static void check_tore(type_or_ent tore, void *env) { int *res = env; - assert(tore); - if (is_type(tore)) { - *res = check_type((ir_type *)tore); + assert(tore.ent); + if (is_type(tore.typ)) { + *res = check_type(tore.typ); } else { - assert(is_entity(tore)); - *res = check_entity((ir_entity *)tore); + assert(is_entity(tore.ent)); + *res = check_entity(tore.ent); } }