From ebbc84105f583fffca1b26ac4804feebd309272b Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Tue, 9 Aug 2011 16:45:45 +0200 Subject: [PATCH] isl_dim_get_tuple_id: complain if tuple has no id Signed-off-by: Sven Verdoolaege --- isl_dim.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/isl_dim.c b/isl_dim.c index 93f12e8..514ab5c 100644 --- a/isl_dim.c +++ b/isl_dim.c @@ -308,7 +308,12 @@ __isl_give isl_id *isl_dim_get_tuple_id(__isl_keep isl_dim *dim, if (!dim) return NULL; if (type != isl_dim_in && type != isl_dim_out) - return NULL; + isl_die(dim->ctx, isl_error_invalid, + "only input, output and set tuples can have ids", + return NULL); + if (!dim->tuple_id[type - isl_dim_in]) + isl_die(dim->ctx, isl_error_invalid, + "tuple has no id", return NULL); return isl_id_copy(dim->tuple_id[type - isl_dim_in]); } -- 2.7.4