isl_pw_*_opt: use correct space in case of empty input
authorSven Verdoolaege <skimo@kotnet.org>
Tue, 25 Oct 2011 14:40:19 +0000 (16:40 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Wed, 2 Nov 2011 15:32:12 +0000 (16:32 +0100)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_pw_templ.c

index ddabbc5..8e5d15f 100644 (file)
@@ -1068,7 +1068,7 @@ __isl_give isl_qpolynomial *FN(PW,opt)(__isl_take PW *pw, int max)
        if (pw->n == 0) {
                isl_space *dim = isl_space_copy(pw->dim);
                FN(PW,free)(pw);
-               return isl_qpolynomial_zero_on_domain(dim);
+               return isl_qpolynomial_zero_on_domain(isl_space_domain(dim));
        }
 
        opt = FN(EL,opt_on_domain)(FN(EL,copy)(pw->p[0].FIELD),