From: Sven Verdoolaege Date: Sat, 20 Feb 2010 23:03:57 +0000 (+0100) Subject: isl_map_intersect: detect empty result also in case of adding a single constraint X-Git-Tag: isl-0.02~52 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bbbd38bb6ed26e4297e86de22a4318b9c50d62b9;p=platform%2Fupstream%2Fisl.git 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. --- 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;