/*
- * 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.
*
#endif /* #ifndef NDEBUG */
-/** If the address is Sel or SymConst, return the entity. */
+/**
+ * If the address is Sel or SymConst, return the entity.
+ *
+ * @param ptr the node representing the address
+ */
static ir_entity *get_ptr_entity(ir_node *ptr) {
if (get_irn_op(ptr) == op_Sel) {
return get_Sel_entity(ptr);
- } else if ((get_irn_op(ptr) == op_SymConst) && (get_SymConst_kind(ptr) == symconst_addr_ent)) {
+ } else if (is_SymConst_addr_ent(ptr)) {
return get_SymConst_entity(ptr);
}
return NULL;
"wrong Proj from Call", 0,
show_proj_failure(p);
);
+ /* if we have exception flow, we must have a real Memory input */
if (proj == pn_Call_X_regular)
ASSERT_AND_RET(
get_irn_op(get_Call_mem(n)) != op_NoMem,
"wrong Proj from Cmp", 0,
show_proj_failure(p);
);
+ ASSERT_AND_RET_DBG(
+ (mode_is_float(get_irn_mode(get_Cmp_left(n))) || !(proj & pn_Cmp_Uo)),
+ "unordered Proj for non-float Cmp", 0,
+ show_proj_failure(p);
+ );
return 1;
}
get_Call_n_params(n) >= get_method_n_params(mt),
"Number of args for Call doesn't match number of args in variadic type.",
0,
- fprintf(stderr, "Call has %d params, method %s type %d\n",
- get_Call_n_params(n), get_type_name(mt), get_method_n_params(mt));
+ ir_fprintf(stderr, "Call %+F has %d params, method %s type %d\n",
+ n, get_Call_n_params(n), get_type_name(mt), get_method_n_params(mt));
);
} else {
- ASSERT_AND_RET(
+ ASSERT_AND_RET_DBG(
get_Call_n_params(n) == get_method_n_params(mt),
"Number of args for Call doesn't match number of args in non variadic type.",
- 0);
+ 0,
+ ir_fprintf(stderr, "Call %+F has %d params, method %s type %d\n",
+ n, get_Call_n_params(n), get_type_name(mt), get_method_n_params(mt));
+ );
}
for (i = 0; i < get_method_n_params(mt); i++) {
rem = current_ir_graph;
current_ir_graph = irg;
- last_irg_error = NULL;
+
+#ifndef NDEBUG
+ last_irg_error = NULL;
+#endif /* NDEBUG */
assert(get_irg_pinned(irg) == op_pin_state_pinned && "Verification need pinned graph");