fixed svn properties
[libfirm] / ir / tr / trvrfy.c
index 7a83dc1..81d4c03 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;
 
 #ifdef NDEBUG
 /*
@@ -79,6 +76,10 @@ do { \
 
 #endif /* NDEBUG */
 
+#ifndef NDEBUG
+
+static const char *firm_vrfy_failure_msg;
+
 /**
  * Show diagnostic if an entity overwrites another one not
  * in direct superclasses.
@@ -139,6 +140,17 @@ static void show_ent_overwrite_cnt(ir_entity *ent) {
        }
 }
 
+/**
+ * Shows a wrong entity allocation
+ */
+static void show_ent_alloc_error(ir_entity *ent) {
+       ir_fprintf(stderr, "%+e owner %t has allocation %s\n",
+               ent, get_entity_type(ent),
+               get_allocation_name(get_entity_allocation(ent)));
+}
+
+#endif /* #ifndef NDEBUG */
+
 /**
  * Check a class
  */
@@ -300,7 +312,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;
                }
@@ -321,15 +333,6 @@ static int constants_on_wrong_irg(ir_entity *ent) {
        return 0;
 }
 
-/**
- * Shows a wrong entity allocation
- */
-static void show_ent_alloc_error(ir_entity *ent) {
-       ir_fprintf(stderr, "%+e owner %t has allocation %s\n",
-               ent, get_entity_type(ent),
-               get_allocation_name(get_entity_allocation(ent)));
-}
-
 /*
  * Check an entity. Currently, we check only if initialized constants
  * are build on the const irg graph.