From 8c50b3fb36a190aea31cd71397a9740717782c9a Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Tue, 31 Jan 2012 15:09:12 +0100 Subject: [PATCH] isl_tab_pip.c: sol_add: skip empty contexts If the context becomes non-empty inside find_solutions, we stop looking for solutions since a89841a (isl_tab_pip.c: find_solutions: break when context becomes empty, Sun Jan 31 18:29:12 2010 +0100), but we still call sol_add. We need to return from sol_add early in such cases because there is nothing to do and, more importantly, when a basic set is marked empty, its existentials are removed, resulting in a mismatch in the number of dimensions. In particular, the basic set returned by sol_domain may not satisfy all assumptions made by the remainder of sol_add. Signed-off-by: Sven Verdoolaege --- isl_tab_pip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/isl_tab_pip.c b/isl_tab_pip.c index d94e51f..1a9f003 100644 --- a/isl_tab_pip.c +++ b/isl_tab_pip.c @@ -431,6 +431,8 @@ static void sol_add(struct isl_sol *sol, struct isl_tab *tab) if (tab->empty && !sol->add_empty) return; + if (sol->context->op->is_empty(sol->context)) + return; bset = sol_domain(sol); -- 2.7.4