public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/40370] [4.4/4.5 Regression] ICE with invalid array bound in template class
2009-06-07 20:29 [Bug c++/40370] New: [4.4/4.5 Regression] ICE with invalid array bound in template class reichelt at gcc dot gnu dot org
@ 2009-06-07 20:29 ` reichelt at gcc dot gnu dot org
2009-06-08 9:34 ` jakub at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2009-06-07 20:29 UTC (permalink / raw)
To: gcc-bugs
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.4.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40370
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/40370] New: [4.4/4.5 Regression] ICE with invalid array bound in template class
@ 2009-06-07 20:29 reichelt at gcc dot gnu dot org
2009-06-07 20:29 ` [Bug c++/40370] " reichelt at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2009-06-07 20:29 UTC (permalink / raw)
To: gcc-bugs
The following invalid code snippet triggers an ICE since GCC 4.4.0:
=================================
struct A
{
static int i;
};
template<int> struct B
{
int x[A::i];
};
=================================
bug.cc:8:13: internal compiler error: tree check: did not expect class 'type',
have 'type' (record_type) in contains_placeholder_p, at tree.c:2498
Please submit a full bug report, [etc.]
The bug is related to PR28879.
--
Summary: [4.4/4.5 Regression] ICE with invalid array bound in
template class
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code, monitored
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40370
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/40370] [4.4/4.5 Regression] ICE with invalid array bound in template class
2009-06-07 20:29 [Bug c++/40370] New: [4.4/4.5 Regression] ICE with invalid array bound in template class reichelt at gcc dot gnu dot org
2009-06-07 20:29 ` [Bug c++/40370] " reichelt at gcc dot gnu dot org
@ 2009-06-08 9:34 ` jakub at gcc dot gnu dot org
2009-06-08 16:26 ` jakub at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-06-08 9:34 UTC (permalink / raw)
To: gcc-bugs
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-06-08 09:33:56
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40370
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/40370] [4.4/4.5 Regression] ICE with invalid array bound in template class
2009-06-07 20:29 [Bug c++/40370] New: [4.4/4.5 Regression] ICE with invalid array bound in template class reichelt at gcc dot gnu dot org
2009-06-07 20:29 ` [Bug c++/40370] " reichelt at gcc dot gnu dot org
2009-06-08 9:34 ` jakub at gcc dot gnu dot org
@ 2009-06-08 16:26 ` jakub at gcc dot gnu dot org
2009-06-08 16:31 ` jakub at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-06-08 16:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jakub at gcc dot gnu dot org 2009-06-08 16:26 -------
Subject: Bug 40370
Author: jakub
Date: Mon Jun 8 16:26:01 2009
New Revision: 148278
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=148278
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:
trunk/gcc/testsuite/g++.dg/template/error41.C
trunk/gcc/testsuite/g++.dg/template/error42.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40370
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/40370] [4.4/4.5 Regression] ICE with invalid array bound in template class
2009-06-07 20:29 [Bug c++/40370] New: [4.4/4.5 Regression] ICE with invalid array bound in template class reichelt at gcc dot gnu dot org
` (2 preceding siblings ...)
2009-06-08 16:26 ` jakub at gcc dot gnu dot org
@ 2009-06-08 16:31 ` jakub at gcc dot gnu dot org
2009-06-08 16:40 ` jakub at gcc dot gnu dot org
2009-06-08 21:54 ` reichelt at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-06-08 16:31 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/40370] [4.4/4.5 Regression] ICE with invalid array bound in template class
2009-06-07 20:29 [Bug c++/40370] New: [4.4/4.5 Regression] ICE with invalid array bound in template class reichelt at gcc dot gnu dot org
` (3 preceding siblings ...)
2009-06-08 16:31 ` jakub at gcc dot gnu dot org
@ 2009-06-08 16:40 ` jakub at gcc dot gnu dot org
2009-06-08 21:54 ` reichelt at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-06-08 16:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jakub at gcc dot gnu dot org 2009-06-08 16:40 -------
Fixed.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40370
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/40370] [4.4/4.5 Regression] ICE with invalid array bound in template class
2009-06-07 20:29 [Bug c++/40370] New: [4.4/4.5 Regression] ICE with invalid array bound in template class reichelt at gcc dot gnu dot org
` (4 preceding siblings ...)
2009-06-08 16:40 ` jakub at gcc dot gnu dot org
@ 2009-06-08 21:54 ` reichelt at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2009-06-08 21:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from reichelt at gcc dot gnu dot org 2009-06-08 21:54 -------
Thanks, Jakub.
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40370
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-06-08 21:54 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-07 20:29 [Bug c++/40370] New: [4.4/4.5 Regression] ICE with invalid array bound in template class reichelt at gcc dot gnu dot org
2009-06-07 20:29 ` [Bug c++/40370] " reichelt at gcc dot gnu dot org
2009-06-08 9:34 ` jakub at gcc dot gnu dot org
2009-06-08 16:26 ` jakub at gcc dot gnu dot org
2009-06-08 16:31 ` jakub at gcc dot gnu dot org
2009-06-08 16:40 ` jakub at gcc dot gnu dot org
2009-06-08 21:54 ` reichelt at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).