From 96d84135e83bdba8a5492854a827af2f845d7291 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Sat, 2 Jul 2011 10:04:31 +0200 Subject: [PATCH] isl_local_space_get_div: check that the div has a known expression Signed-off-by: Sven Verdoolaege --- isl_local_space.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/isl_local_space.c b/isl_local_space.c index a57b31eb..0ae2d894 100644 --- a/isl_local_space.c +++ b/isl_local_space.c @@ -180,6 +180,10 @@ __isl_give isl_div *isl_local_space_get_div(__isl_keep isl_local_space *ls, isl_die(isl_local_space_get_ctx(ls), isl_error_invalid, "index out of bounds", return NULL); + if (isl_int_is_zero(ls->div->row[pos][0])) + isl_die(isl_local_space_get_ctx(ls), isl_error_invalid, + "expression of div unknown", return NULL); + bmap = isl_basic_map_from_local_space(isl_local_space_copy(ls)); return isl_basic_map_div(bmap, pos); } -- 2.11.4.GIT