case iro_Cond:
ASSERT_AND_RET_DBG(
- (proj >= 0 && mode == mode_X),
- "wrong Proj from Cond", 0,
- show_proj_failure(p);
+ (
+ (proj >= 0 && mode == mode_X && get_irn_mode(get_Cond_selector(pred)) == mode_b) || /* compare */
+ (mode == mode_X && mode_is_int(get_irn_mode(get_Cond_selector(pred)))) /* switch */
+ ),
+ "wrong Proj from Cond", 0,
+ show_proj_failure(p);
);
break;
if (tarval_is_entity(tv))
ASSERT_AND_RET(
(get_irn_irg(n) == get_const_code_irg()) ||
- (get_entity_peculiarity(tarval_to_entity(tv)) != peculiarity_description),
+ (get_entity_peculiarity(get_tarval_entity(tv)) != peculiarity_description),
"descriptions have no address", 0);
ASSERT_AND_RET(
/* Const: BB --> data */
} break;
case iro_SymConst:
+ if (get_SymConst_kind(n) == symconst_addr_ent) {
+ entity *ent = get_SymConst_entity(n);
+ if (is_method_type(get_entity_type(ent)) &&
+ get_irn_irg(n) != get_const_code_irg()) {
+#if 0
+ ASSERT_AND_RET((get_entity_peculiarity(ent) != peculiarity_description),
+ "A constant must address an existing method.", 0);
+#endif
+ }
+ }
ASSERT_AND_RET(
/* SymConst: BB --> int*/
(mode_is_int(mymode) ||