summaryrefslogtreecommitdiff
path: root/isl_constraint.c
diff options
context:
space:
mode:
authorSven Verdoolaege <skimo@kotnet.org>2010-06-04 19:08:34 +0200
committerSven Verdoolaege <skimo@kotnet.org>2010-06-04 19:08:34 +0200
commit1a052667ab742e0763877455de16862b32bebbb3 (patch)
treec24fbe50623407599a4877021d8d8953a5e618aa /isl_constraint.c
parent218439fe3bdbf807e18ec64b8b0372a7de23ded4 (diff)
downloadisl-1a052667ab742e0763877455de16862b32bebbb3.tar.gz
isl-1a052667ab742e0763877455de16862b32bebbb3.tar.bz2
isl-1a052667ab742e0763877455de16862b32bebbb3.zip
isl_basic_map_foreach_constraint: make sure input has been finalized
Each constraint gets a copy of the input and a line from the constraint matrix of the input. If the input wouldn't be finalized, then the copy would create a duplicate and then the line wouldn't match the basic map. This is problematic for especially isl_constraint_is_equality.
Diffstat (limited to 'isl_constraint.c')
-rw-r--r--isl_constraint.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/isl_constraint.c b/isl_constraint.c
index 1566a881..d2bdb28c 100644
--- a/isl_constraint.c
+++ b/isl_constraint.c
@@ -203,6 +203,9 @@ int isl_basic_map_foreach_constraint(__isl_keep isl_basic_map *bmap,
if (!bmap)
return -1;
+ isl_assert(bmap->ctx, ISL_F_ISSET(bmap, ISL_BASIC_MAP_FINAL),
+ return -1);
+
for (i = 0; i < bmap->n_eq; ++i) {
c = isl_basic_map_constraint(isl_basic_map_copy(bmap),
&bmap->eq[i]);