From aa70460a9bec70898c2d4f96cd255bf32906df68 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Sat, 19 Dec 2009 11:20:34 +0100 Subject: [PATCH] isl_basic_map_gist: don't drop equalities from context The context isn't cowed, so this dropping of equalities would be visible to the caller. Instead, drop the equalities after duplicating the context. --- isl_map_simplify.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/isl_map_simplify.c b/isl_map_simplify.c index 8623e38..04d2771 100644 --- a/isl_map_simplify.c +++ b/isl_map_simplify.c @@ -1576,9 +1576,10 @@ static struct isl_basic_set *uset_gist(struct isl_basic_set *bset, bset = remove_shifted_constraints(bset, context); if (!bset->n_ineq) goto done; - isl_basic_set_free_equality(context, context->n_eq); context_ineq = context->n_ineq; combined = isl_basic_set_cow(isl_basic_set_copy(context)); + if (isl_basic_set_free_equality(combined, context->n_eq) < 0) + goto error; combined = isl_basic_set_extend_constraints(combined, bset->n_eq, bset->n_ineq); tab = isl_tab_from_basic_set(combined); -- 2.7.4