This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/40370] [4.4/4.5 Regression] ICE with invalid array bound in template class
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Jun 2009 16:31:23 -0000
- Subject: [Bug c++/40370] [4.4/4.5 Regression] ICE with invalid array bound in template class
- References: <bug-40370-1771@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from jakub at gcc dot gnu dot org 2009-06-08 16:31 -------
Subject: Bug 40370
Author: jakub
Date: Mon Jun 8 16:31:07 2009
New Revision: 148281
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=148281
Log:
PR c++/40370
PR c++/40372
* parser.c (cp_parser_direct_declarator): Don't set TREE_SIDE_EFFECTS
on error_mark_node. Check for VLAs outside of function context
before check whether to wrap bounds into a NOP_EXPR with
TREE_SIDE_EFFECTS.
* g++.dg/template/error41.C: New test.
* g++.dg/template/error42.C: New test.
Added:
branches/gcc-4_4-branch/gcc/testsuite/g++.dg/template/error41.C
branches/gcc-4_4-branch/gcc/testsuite/g++.dg/template/error42.C
Modified:
branches/gcc-4_4-branch/gcc/cp/ChangeLog
branches/gcc-4_4-branch/gcc/cp/parser.c
branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40370