From bbbd38bb6ed26e4297e86de22a4318b9c50d62b9 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Sun, 21 Feb 2010 00:03:57 +0100 Subject: [PATCH] isl_map_intersect: detect empty result also in case of adding a single constraint Commit ed3b444 (isl_map_intersect: add special case for adding a single constraint) added a special case of adding a single constraint but neglected to detect an empty result in this special case. --- isl_map.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/isl_map.c b/isl_map.c index 6840726..01f1758 100644 --- a/isl_map.c +++ b/isl_map.c @@ -1876,6 +1876,11 @@ static __isl_give isl_map *map_intersect_add_constraint( if (!map1->p[0]) goto error; + if (isl_basic_map_fast_is_empty(map1->p[0])) { + isl_basic_map_free(map1->p[0]); + map1->n = 0; + } + isl_map_free(map2); return map1; -- 2.7.4