summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beverify.c
diff options
context:
space:
mode:
authorChristoph Mallon <mallon@cs.uni-saarland.de>2015-01-24 17:34:22 +0100
committerChristoph Mallon <mallon@cs.uni-saarland.de>2015-01-25 10:46:04 +0100
commit8aa9e4d9e6308418f82ee18f8a11e501425497fe (patch)
tree08ab37e9e8e8f16012b01879ff19b25cbeed0a7c /ir/be/beverify.c
parent9aea9ec901671b46ca920c344a65e6c7e61d0e63 (diff)
beverify: Do not crash, when a node incorrectly has no input requirements.
Diffstat (limited to 'ir/be/beverify.c')
-rw-r--r--ir/be/beverify.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ir/be/beverify.c b/ir/be/beverify.c
index 05e657f..4bad7ec 100644
--- a/ir/be/beverify.c
+++ b/ir/be/beverify.c
@@ -579,6 +579,13 @@ static void check_output_constraints(be_verify_reg_alloc_env_t *const env, const
static void check_input_constraints(be_verify_reg_alloc_env_t *const env, ir_node *const node)
{
+ arch_register_req_t const **const in_reqs = arch_get_irn_register_reqs_in(node);
+ if (!in_reqs && get_irn_arity(node) != 0) {
+ verify_warnf(node, "%+F has no input requirements", node);
+ env->problem_found = true;
+ return;
+ }
+
/* verify input register */
foreach_irn_in(node, i, pred) {
if (is_Bad(pred)) {