From 9a82b3d54c7682f4adda78d72a941e7dc294fe1d Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Sat, 10 Apr 2010 16:15:38 +0200 Subject: [PATCH] isl_map_compute_divs: handle non-obviously empty input In particular, properly handle the case where variable compression detects that the input map is actually empty. --- isl_map.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/isl_map.c b/isl_map.c index 49a72815..6512f03f 100644 --- a/isl_map.c +++ b/isl_map.c @@ -4322,6 +4322,13 @@ static struct isl_set *parameter_compute_divs(struct isl_basic_set *bset) 0, 1 + nparam); eq = isl_mat_cow(eq); T = isl_mat_variable_compression(isl_mat_copy(eq), &T2); + if (T && T->n_col == 0) { + isl_mat_free(T); + isl_mat_free(T2); + isl_mat_free(eq); + bset = isl_basic_set_set_to_empty(bset); + return isl_set_from_basic_set(bset); + } bset = basic_set_parameter_preimage(bset, T); set = isl_basic_set_lexmin(bset); -- 2.11.4.GIT