This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/28906] [4.2 regression] rejects valid arrays
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Aug 2006 11:06:20 -0000
- Subject: [Bug c++/28906] [4.2 regression] rejects valid arrays
- References: <bug-28906-12387@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from pinskia at gcc dot gnu dot org 2006-08-31 11:06 -------
Doing:
Index: init.c
===================================================================
--- init.c (revision 116553)
+++ init.c (working copy)
@@ -1628,7 +1628,7 @@ build_new_1 (tree placement, tree type,
function context. Methinks that's not it's purvey. So we'll do
our own VLA layout later. */
vla_p = true;
- full_type = build_cplus_array_type (type, NULL_TREE);
+ full_type = copy_node (build_cplus_array_type (type, NULL_TREE));
index = convert (sizetype, nelts);
index = size_binop (MINUS_EXPR, index, size_one_node);
TYPE_DOMAIN (full_type) = build_index_type (index);
Will fix the problem but I don't know if this is the correct fix.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28906