isl_stream_read_pw_qpolynomial: accept powers on compound expressions
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 2 Dec 2010 15:41:49 +0000 (16:41 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Tue, 7 Dec 2010 09:40:16 +0000 (10:40 +0100)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_input.c

index eba527c..ec25b7f 100644 (file)
@@ -1330,12 +1330,16 @@ static __isl_give isl_qpolynomial *read_factor(struct isl_stream *s,
                return NULL;
        }
        if (tok->type == '(') {
+               int pow;
+
                isl_token_free(tok);
                qp = read_term(s, bmap, v);
                if (!qp)
                        return NULL;
                if (isl_stream_eat(s, ')'))
                        goto error;
+               pow = optional_power(s);
+               qp = isl_qpolynomial_pow(qp, pow);
        } else if (tok->type == ISL_TOKEN_VALUE) {
                struct isl_token *tok2;
                tok2 = isl_stream_next_token(s);