From 523c0b1a9e8d483875b814a9dd0af33c2b6434d7 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Thu, 18 Dec 2014 14:56:22 +0100 Subject: [PATCH] isl_union_set_lattice_width: check whether input is union If it is, then we do not do anything sensible with the input, so error out instead. Signed-off-by: Sven Verdoolaege --- lattice_width.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lattice_width.c b/lattice_width.c index e56638b..3c028ae 100644 --- a/lattice_width.c +++ b/lattice_width.c @@ -533,6 +533,9 @@ __isl_give isl_union_pw_qpolynomial *isl_union_set_lattice_width( dim = isl_union_set_get_space(uset); res = isl_union_pw_qpolynomial_zero(dim); + if (isl_union_set_n_set(uset) > 1) + isl_die(isl_union_set_get_ctx(uset), isl_error_unsupported, + "unions not supported (yet)", goto error); if (isl_union_set_foreach_set(uset, &set_lw, &res) < 0) goto error; isl_union_set_free(uset); -- 2.11.4.GIT