isl_qpolynomial_max: fix detection of inactive variables
authorSven Verdoolaege <skimo@kotnet.org>
Sat, 27 Mar 2010 12:21:00 +0000 (13:21 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Tue, 30 Mar 2010 10:05:02 +0000 (12:05 +0200)
Without this patch, some active set dimensions would be treated
as inactive and effectively be removed, resulting in an incorrect maximum.

isl_polynomial.c

index 8b4a8be..4a96add 100644 (file)
@@ -2609,7 +2609,7 @@ static __isl_give isl_set *fix_inactive(__isl_take isl_set *set,
                set = isl_set_fix_si(set, isl_dim_param, i, 0);
        }
        for (i = 0; i < nvar; ++i) {
-               if (active[i])
+               if (active[nparam + i])
                        continue;
                set = isl_set_eliminate(set, isl_dim_set, i, 1);
                set = isl_set_fix_si(set, isl_dim_set, i, 0);