From 89ba296aee5aa06b1c97febb4cb2e294f7b3572f Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Mon, 22 Dec 2008 16:25:34 +0100 Subject: [PATCH] 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. --- isl_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.7.4