isl_input.c: obj_read: error out on intermediate NULL results
authorSven Verdoolaege <skimo@kotnet.org>
Wed, 22 Sep 2010 08:01:54 +0000 (10:01 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Wed, 22 Sep 2010 19:54:56 +0000 (21:54 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_input.c

index 24f64af..a9879bc 100644 (file)
@@ -1695,14 +1695,14 @@ static struct isl_obj obj_read(struct isl_stream *s, int nparam)
                struct isl_obj o;
                tok = NULL;
                o = obj_read_body(s, isl_dim_copy(dim), v);
-               if (o.type == isl_obj_none)
-                       break;
+               if (o.type == isl_obj_none || !o.v)
+                       goto error;
                if (!obj.v)
                        obj = o;
                else {
                        obj = obj_add(s->ctx, obj, o);
-                       if (obj.type == isl_obj_none)
-                               break;
+                       if (obj.type == isl_obj_none || !obj.v)
+                               goto error;
                }
                tok = isl_stream_next_token(s);
                if (!tok || tok->type != ';')