no environment anymore for emitters
[libfirm] / ir / tr / trvrfy.c
index 7a83dc1..80836c9 100644 (file)
 #include "config.h"
 #endif
 
-#include "trvrfy.h"
 #include "irgraph_t.h"  /* for checking whether constant code is allocated
                            on proper obstack */
 #include "irflag_t.h"
 #include "irprintf.h"
 #include "irgwalk.h"
-#include "typewalk.h"
 
 static const char *firm_vrfy_failure_msg;
 
@@ -300,7 +298,7 @@ static int constants_on_wrong_irg(ir_entity *ent) {
 
        if (is_compound_entity(ent)) {
                int i;
-               for (i = 0; i < get_compound_ent_n_values(ent); 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;
                }