* decl.c (compute_array_index_type): Use size_one_node.
authorJason Merrill <jason@redhat.com>
Fri, 21 Jun 2013 00:28:23 +0000 (20:28 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 21 Jun 2013 00:28:23 +0000 (20:28 -0400)
From-SVN: r200278

gcc/cp/ChangeLog
gcc/cp/decl.c

index a7df33b562cf2bece27d9c3162012f88ce033756..adff4e4d36a55622dba37113cb22d6277a98e255 100644 (file)
@@ -1,5 +1,7 @@
 2013-06-20  Jason Merrill  <jason@redhat.com>
 
+       * 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
index 9eb1d12ceb2ed411f9c4d17b0f881510de027db5..dad1e102dc653b80f0d751c9ada620596255f1c6 100644 (file)
@@ -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);