From 8fc95c057c13a936806315026521b505cdbb28c9 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 20 Jun 2013 20:28:23 -0400 Subject: [PATCH] * decl.c (compute_array_index_type): Use size_one_node. From-SVN: r200278 --- gcc/cp/ChangeLog | 2 ++ gcc/cp/decl.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index a7df33b562c..adff4e4d36a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,7 @@ 2013-06-20 Jason Merrill + * decl.c (compute_array_index_type): Use size_one_node. + * pt.c (process_partial_specialization): Build a TEMPLATE_DECL for a partial specialization. (tsubst_decl): Don't clobber CLASSTYPE_TI_TEMPLATE of a partial diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 9eb1d12ceb2..dad1e102dc6 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -8241,7 +8241,7 @@ compute_array_index_type (tree name, tree size, tsubst_flags_t complain) constant. Just build the index type and mark that it requires structural equality checks. */ itype = build_index_type (build_min (MINUS_EXPR, sizetype, - size, integer_one_node)); + size, size_one_node)); TYPE_DEPENDENT_P (itype) = 1; TYPE_DEPENDENT_P_VALID (itype) = 1; SET_TYPE_STRUCTURAL_EQUALITY (itype); -- 2.30.2