isl_map_project_out: properly handle named or nested spaces
authorSven Verdoolaege <skimo@kotnet.org>
Mon, 2 Jan 2012 13:10:50 +0000 (14:10 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Mon, 2 Jan 2012 13:12:13 +0000 (14:12 +0100)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_map.c

index 8b4aea3..d2d6759 100644 (file)
--- a/isl_map.c
+++ b/isl_map.c
@@ -2995,7 +2995,7 @@ __isl_give isl_basic_map *isl_basic_map_project_out(
        isl_int *old;
 
        if (n == 0)
-               return bmap;
+               return basic_map_space_reset(bmap, type);
 
        if (!bmap)
                return NULL;
@@ -3065,7 +3065,7 @@ __isl_give isl_map *isl_map_project_out(__isl_take isl_map *map,
                return NULL;
 
        if (n == 0)
-               return map;
+               return map_space_reset(map, type);
 
        isl_assert(map->ctx, first + n <= isl_map_dim(map, type), goto error);