aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-array-notation.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/cp-array-notation.c')
-rw-r--r--gcc/cp/cp-array-notation.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/cp-array-notation.c b/gcc/cp/cp-array-notation.c
index d445054..84d7925 100644
--- a/gcc/cp/cp-array-notation.c
+++ b/gcc/cp/cp-array-notation.c
@@ -1380,7 +1380,12 @@ build_array_notation_ref (location_t loc, tree array, tree start, tree length,
if (!stride)
stride = build_one_cst (ptrdiff_type_node);
-
+
+ stride = maybe_constant_value (stride);
+ length = maybe_constant_value (length);
+ if (start)
+ start = maybe_constant_value (start);
+
/* When dealing with templates, triplet type-checking will be done in pt.c
after type substitution. */
if (processing_template_decl