This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/18429] [4.0 Regression] ICE on invalid code with array size being a non constant variable
- 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: 11 Nov 2004 16:51:51 -0000
- Subject: [Bug c++/18429] [4.0 Regression] ICE on invalid code with array size being a non constant variable
- References: <20041111162120.18429.andre.maute@gmx.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-11 16:51 -------
: Search converges between 2004-07-29-trunk (#498) and 2004-07-30-trunk (#499).
Reduced testcase every where:
int subtrees = 4;
template< class T >
struct Tree {
Tree* L[subtrees];
Tree* R[subtrees];
~Tree()
{
delete [] L[0];
delete [] R[0];
}
};
void f()
{
Tree<int> t;
}
Note the following is a 4.0 regression though:
int subtrees = 4;
template< class T >
struct Tree {
Tree* L[subtrees];
Tree() { }
};
void f()
{
Tree<int> t;
}
Also this is invalid code as int *L[variable]; should have been rejected as variable is not constant, note
(at least on the mainline) we reject it for non templates.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |ice-on-invalid-code
Last reconfirmed|0000-00-00 00:00:00 |2004-11-11 16:51:44
date| |
Summary|ICE for g++-3.3.5/ endless |[4.0 Regression] ICE on
|loop for g++-3.4.3 (template|invalid code with array size
|and namespace) |being a non constant
| |variable
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18429