struct isl_sol_for *sol_for = NULL;
bmap = isl_basic_map_copy(bmap);
+ bmap = isl_basic_map_detect_equalities(bmap);
if (!bmap)
return -1;
- bmap = isl_basic_map_detect_equalities(bmap);
sol_for = sol_for_init(bmap, max, fn, user);
+ if (!sol_for)
+ goto error;
if (isl_basic_map_plain_is_empty(bmap))
/* nothing */;
{
int i, j;
int r;
- isl_ctx *ctx = isl_basic_set_get_ctx(bset);
+ isl_ctx *ctx;
isl_vec *v = NULL;
- isl_vec *sol = isl_vec_alloc(ctx, 0);
+ isl_vec *sol = NULL;
struct isl_tab *tab;
struct isl_trivial *triv = NULL;
int level, init;
+ if (!bset)
+ return NULL;
+
+ ctx = isl_basic_set_get_ctx(bset);
+ sol = isl_vec_alloc(ctx, 0);
+
tab = tab_for_lexmin(bset, NULL, 0, 0);
if (!tab)
goto error;
isl_ctx *ctx = isl_basic_set_get_ctx(bset);
isl_vec *sol;
+ if (!bset)
+ return NULL;
+
tab = tab_for_lexmin(bset, NULL, 0, 0);
if (!tab)
goto error;