isl_qpolynomial_insert_dims: properly handle named or nested spaces
authorSven Verdoolaege <skimo@kotnet.org>
Tue, 28 Jun 2011 21:18:20 +0000 (23:18 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Wed, 29 Jun 2011 19:07:08 +0000 (21:07 +0200)
For consistency, we remove any naming or nesting even if n == 0.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_polynomial.c

index ec973cc..0639789 100644 (file)
@@ -2780,7 +2780,7 @@ __isl_give isl_qpolynomial *isl_qpolynomial_insert_dims(
        unsigned g_pos;
        int *exp;
 
-       if (n == 0)
+       if (n == 0 && !isl_dim_is_named_or_nested(qp->dim, type))
                return qp;
 
        qp = isl_qpolynomial_cow(qp);