isl_map_read: make sure polylib constraint coefficients are on a single line
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 4 Feb 2010 16:51:11 +0000 (17:51 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Thu, 4 Feb 2010 16:51:11 +0000 (17:51 +0100)
isl_input.c

index 42ab055..bdd9a2f 100644 (file)
@@ -623,6 +623,12 @@ static __isl_give isl_basic_map *basic_map_read_polylib_constraint(
                                isl_stream_push_token(s, tok);
                        goto error;
                }
+               if (tok->on_new_line) {
+                       isl_stream_error(s, tok,
+                               "coefficient should not appear on new line");
+                       isl_stream_push_token(s, tok);
+                       goto error;
+               }
                pos = polylib_pos_to_isl_pos(bmap, j);
                isl_int_set(c[pos], tok->u.v);
                isl_token_free(tok);