From 245caf88207fdc36a4a3e037b3a158bb86653792 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Fri, 20 May 2011 11:23:49 +0200 Subject: [PATCH] isl_aff_alloc: check that all divs are known --- isl_aff.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/isl_aff.c b/isl_aff.c index cc2dc77e..e02de691 100644 --- a/isl_aff.c +++ b/isl_aff.c @@ -45,9 +45,16 @@ __isl_give isl_aff *isl_aff_alloc(__isl_take isl_local_space *ls) return NULL; ctx = isl_local_space_get_ctx(ls); + if (!isl_local_space_divs_known(ls)) + isl_die(ctx, isl_error_invalid, "local space has unknown divs", + goto error); + total = isl_local_space_dim(ls, isl_dim_all); v = isl_vec_alloc(ctx, 1 + 1 + total); return isl_aff_alloc_vec(ls, v); +error: + isl_local_space_free(ls); + return NULL; } __isl_give isl_aff *isl_aff_zero(__isl_take isl_local_space *ls) -- 2.11.4.GIT