From: Sven Verdoolaege Date: Mon, 22 Dec 2008 15:25:34 +0000 (+0100) Subject: isl_basic_set_compare_at: combine constraints before setting up objective X-Git-Tag: isl-0.01~334 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=89ba296aee5aa06b1c97febb4cb2e294f7b3572f;p=platform%2Fupstream%2Fisl.git isl_basic_set_compare_at: combine constraints before setting up objective The number of columns in the objective function should be equal to the number of columns in the domain, but this number may change during the call to add_constraints if bmap2 has any divs. --- diff --git a/isl_map.c b/isl_map.c index e3d6fb7..9aeb6d4 100644 --- a/isl_map.c +++ b/isl_map.c @@ -4610,6 +4610,7 @@ int isl_basic_set_compare_at(struct isl_basic_set *bset1, bmap1 = isl_basic_map_extend(bmap1, nparam, pos, (dim1 - pos) + (dim2 - pos), bmap2->n_div, bmap2->n_eq, bmap2->n_ineq); + bmap1 = add_constraints(bmap1, bmap2, 0, dim1 - pos); if (!bmap1) goto error; total = isl_basic_map_total_dim(bmap1); @@ -4620,7 +4621,6 @@ int isl_basic_set_compare_at(struct isl_basic_set *bset1, isl_int_set_si(obj->block.data[nparam+pos+(dim1-pos)], -1); if (!obj) goto error; - bmap1 = add_constraints(bmap1, bmap2, 0, dim1 - pos); isl_int_init(num); isl_int_init(den); res = isl_solve_lp(bmap1, 0, obj->block.data, ctx->one, &num, &den);