public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/34491] New: [4.1/4.2/4.3 regression] ICE invalid template specialization
@ 2007-12-15 23:10 reichelt at gcc dot gnu dot org
2007-12-15 23:10 ` [Bug c++/34491] " reichelt at gcc dot gnu dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-12-15 23:10 UTC (permalink / raw)
To: gcc-bugs
The following invalid code snippet triggers an ICE since GCC 4.0.3:
====================================
template<typename> struct A;
template<0> struct A<int>
{
static const int i = 0;
};
int n = A<int>::i;
====================================
bug.cc:3: error: expected identifier before numeric constant
bug.cc:3: error: expected '>' before numeric constant
bug.cc:3: error: template parameters not used in partial specialization:
bug.cc:3: error: '<anonymous>'
bug.cc: In instantiation of 'const int A<int>::i':
bug.cc:8: instantiated from here
bug.cc:8: internal compiler error: in instantiate_decl, at cp/pt.c:14598
Please submit a full bug report, [etc.]
--
Summary: [4.1/4.2/4.3 regression] ICE invalid template
specialization
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code, error-recovery, 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=34491
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/34491] [4.1/4.2/4.3 regression] ICE invalid template specialization
2007-12-15 23:10 [Bug c++/34491] New: [4.1/4.2/4.3 regression] ICE invalid template specialization reichelt at gcc dot gnu dot org
@ 2007-12-15 23:10 ` reichelt at gcc dot gnu dot org
2007-12-20 18:07 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-12-15 23:10 UTC (permalink / raw)
To: gcc-bugs
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.1.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34491
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/34491] [4.1/4.2/4.3 regression] ICE invalid template specialization
2007-12-15 23:10 [Bug c++/34491] New: [4.1/4.2/4.3 regression] ICE invalid template specialization reichelt at gcc dot gnu dot org
2007-12-15 23:10 ` [Bug c++/34491] " reichelt at gcc dot gnu dot org
@ 2007-12-20 18:07 ` pinskia at gcc dot gnu dot org
2008-07-04 22:26 ` [Bug c++/34491] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-12-20 18:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-12-20 18:07 -------
Confirmed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-12-20 18:07:37
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34491
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/34491] [4.2/4.3/4.4 regression] ICE invalid template specialization
2007-12-15 23:10 [Bug c++/34491] New: [4.1/4.2/4.3 regression] ICE invalid template specialization reichelt at gcc dot gnu dot org
2007-12-15 23:10 ` [Bug c++/34491] " reichelt at gcc dot gnu dot org
2007-12-20 18:07 ` pinskia at gcc dot gnu dot org
@ 2008-07-04 22:26 ` jsm28 at gcc dot gnu dot org
2008-12-31 21:13 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-07-04 22:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jsm28 at gcc dot gnu dot org 2008-07-04 22:25 -------
Closing 4.1 branch.
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.1/4.2/4.3/4.4 regression]|[4.2/4.3/4.4 regression] ICE
|ICE invalid template |invalid template
|specialization |specialization
Target Milestone|4.1.3 |4.2.5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34491
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/34491] [4.2/4.3/4.4 regression] ICE invalid template specialization
2007-12-15 23:10 [Bug c++/34491] New: [4.1/4.2/4.3 regression] ICE invalid template specialization reichelt at gcc dot gnu dot org
` (2 preceding siblings ...)
2008-07-04 22:26 ` [Bug c++/34491] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
@ 2008-12-31 21:13 ` pinskia at gcc dot gnu dot org
2009-03-31 20:16 ` [Bug c++/34491] [4.3/4.4/4.5 " jsm28 at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-12-31 21:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2008-12-31 21:12 -------
So I was trying to have treat <0> the same as <> if there was an error but
caused worse error messages so I gave up.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34491
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/34491] [4.3/4.4/4.5 regression] ICE invalid template specialization
2007-12-15 23:10 [Bug c++/34491] New: [4.1/4.2/4.3 regression] ICE invalid template specialization reichelt at gcc dot gnu dot org
` (3 preceding siblings ...)
2008-12-31 21:13 ` pinskia at gcc dot gnu dot org
@ 2009-03-31 20:16 ` jsm28 at gcc dot gnu dot org
2009-08-04 12:38 ` rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-03-31 20:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jsm28 at gcc dot gnu dot org 2009-03-31 20:15 -------
Closing 4.2 branch.
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.2/4.3/4.4/4.5 regression]|[4.3/4.4/4.5 regression] ICE
|ICE invalid template |invalid template
|specialization |specialization
Target Milestone|4.2.5 |4.3.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34491
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/34491] [4.3/4.4/4.5 regression] ICE invalid template specialization
2007-12-15 23:10 [Bug c++/34491] New: [4.1/4.2/4.3 regression] ICE invalid template specialization reichelt at gcc dot gnu dot org
` (4 preceding siblings ...)
2009-03-31 20:16 ` [Bug c++/34491] [4.3/4.4/4.5 " jsm28 at gcc dot gnu dot org
@ 2009-08-04 12:38 ` rguenth at gcc dot gnu dot org
2010-05-11 20:54 ` [Bug c++/34491] [4.3/4.4/4.5/4.6 " paolo at gcc dot gnu dot org
2010-05-11 20:56 ` [Bug c++/34491] [4.3/4.4/4.5 " paolo dot carlini at oracle dot com
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-08-04 12:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from rguenth at gcc dot gnu dot org 2009-08-04 12:28 -------
GCC 4.3.4 is being released, adjusting target milestone.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.3.4 |4.3.5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34491
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/34491] [4.3/4.4/4.5/4.6 regression] ICE invalid template specialization
2007-12-15 23:10 [Bug c++/34491] New: [4.1/4.2/4.3 regression] ICE invalid template specialization reichelt at gcc dot gnu dot org
` (5 preceding siblings ...)
2009-08-04 12:38 ` rguenth at gcc dot gnu dot org
@ 2010-05-11 20:54 ` paolo at gcc dot gnu dot org
2010-05-11 20:56 ` [Bug c++/34491] [4.3/4.4/4.5 " paolo dot carlini at oracle dot com
7 siblings, 0 replies; 9+ messages in thread
From: paolo at gcc dot gnu dot org @ 2010-05-11 20:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from paolo at gcc dot gnu dot org 2010-05-11 20:53 -------
Subject: Bug 34491
Author: paolo
Date: Tue May 11 20:53:36 2010
New Revision: 159295
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=159295
Log:
/cp
2010-05-11 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/34272
PR c++/43630
PR c++/34491
* pt.c (process_partial_specialization): Return error_mark_node
in case of unused template parameters in partial specialization.
/testsuite
2010-05-11 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/34272
PR c++/43630
PR c++/34491
* g++.dg/template/crash97.C: New.
* g++.dg/template/crash98.C: Likewise.
* g++.dg/template/crash99.C: Likewise.
* g++.dg/cpp0x/pr31439.C: Adjust.
* g++.dg/template/crash95.C: Likewise.
Added:
trunk/gcc/testsuite/g++.dg/template/crash97.C
trunk/gcc/testsuite/g++.dg/template/crash98.C
trunk/gcc/testsuite/g++.dg/template/crash99.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/cpp0x/pr31439.C
trunk/gcc/testsuite/g++.dg/template/crash95.C
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34491
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/34491] [4.3/4.4/4.5 regression] ICE invalid template specialization
2007-12-15 23:10 [Bug c++/34491] New: [4.1/4.2/4.3 regression] ICE invalid template specialization reichelt at gcc dot gnu dot org
` (6 preceding siblings ...)
2010-05-11 20:54 ` [Bug c++/34491] [4.3/4.4/4.5/4.6 " paolo at gcc dot gnu dot org
@ 2010-05-11 20:56 ` paolo dot carlini at oracle dot com
7 siblings, 0 replies; 9+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-05-11 20:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from paolo dot carlini at oracle dot com 2010-05-11 20:56 -------
Fixed for 4.6.0.
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.3/4.4/4.5/4.6 regression]|[4.3/4.4/4.5 regression] ICE
|ICE invalid template |invalid template
|specialization |specialization
Target Milestone|4.3.5 |4.6.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34491
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-05-11 20:56 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-15 23:10 [Bug c++/34491] New: [4.1/4.2/4.3 regression] ICE invalid template specialization reichelt at gcc dot gnu dot org
2007-12-15 23:10 ` [Bug c++/34491] " reichelt at gcc dot gnu dot org
2007-12-20 18:07 ` pinskia at gcc dot gnu dot org
2008-07-04 22:26 ` [Bug c++/34491] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
2008-12-31 21:13 ` pinskia at gcc dot gnu dot org
2009-03-31 20:16 ` [Bug c++/34491] [4.3/4.4/4.5 " jsm28 at gcc dot gnu dot org
2009-08-04 12:38 ` rguenth at gcc dot gnu dot org
2010-05-11 20:54 ` [Bug c++/34491] [4.3/4.4/4.5/4.6 " paolo at gcc dot gnu dot org
2010-05-11 20:56 ` [Bug c++/34491] [4.3/4.4/4.5 " paolo dot carlini at oracle dot com
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).