summaryrefslogtreecommitdiff
path: root/gcc/tree-chrec.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-chrec.h')
-rw-r--r--gcc/tree-chrec.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/tree-chrec.h b/gcc/tree-chrec.h
index 4a8a3734d79..4838bae89aa 100644
--- a/gcc/tree-chrec.h
+++ b/gcc/tree-chrec.h
@@ -157,8 +157,9 @@ build_polynomial_chrec (unsigned loop_num,
if (chrec_zerop (right))
return left;
- return build3 (POLYNOMIAL_CHREC, TREE_TYPE (left),
- build_int_cst (NULL_TREE, loop_num), left, right);
+ tree chrec = build2 (POLYNOMIAL_CHREC, TREE_TYPE (left), left, right);
+ CHREC_VARIABLE (chrec) = loop_num;
+ return chrec;
}
/* Determines whether the expression CHREC is a constant. */