From b24f3572c7356d60cac0b59b862954308a3342aa Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Fri, 13 Apr 2012 13:01:21 +0200 Subject: [PATCH] isl_tab_relax: prevent relaxation on dead or redundant constraints Trying to relax such constraints can only lead to problems, especially if the constraints have been removed from the tableau. Signed-off-by: Sven Verdoolaege --- isl_tab.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/isl_tab.c b/isl_tab.c index 097b335c..a5e55b06 100644 --- a/isl_tab.c +++ b/isl_tab.c @@ -2556,6 +2556,13 @@ struct isl_tab *isl_tab_relax(struct isl_tab *tab, int con) var = &tab->con[con]; + if (var->is_row && (var->index < 0 || var->index < tab->n_redundant)) + isl_die(tab->mat->ctx, isl_error_invalid, + "cannot relax redundant constraint", goto error); + if (!var->is_row && (var->index < 0 || var->index < tab->n_dead)) + isl_die(tab->mat->ctx, isl_error_invalid, + "cannot relax dead constraint", goto error); + if (!var->is_row && !max_is_manifestly_unbounded(tab, var)) if (to_row(tab, var, 1) < 0) goto error; -- 2.11.4.GIT