public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13797] New: ICE
@ 2004-01-21 20:23 igodard at pacbell dot net
2004-01-21 20:24 ` [Bug c++/13797] ICE igodard at pacbell dot net
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: igodard at pacbell dot net @ 2004-01-21 20:23 UTC (permalink / raw)
To: gcc-bugs
--
Summary: ICE
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: igodard at pacbell dot net
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13797
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/13797] ICE
2004-01-21 20:23 [Bug c++/13797] New: ICE igodard at pacbell dot net
@ 2004-01-21 20:24 ` igodard at pacbell dot net
2004-01-21 20:25 ` igodard at pacbell dot net
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: igodard at pacbell dot net @ 2004-01-21 20:24 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From igodard at pacbell dot net 2004-01-21 20:24 -------
Created an attachment (id=5547)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5547&action=view)
Source code (-save-temps)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13797
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/13797] ICE
2004-01-21 20:23 [Bug c++/13797] New: ICE igodard at pacbell dot net
2004-01-21 20:24 ` [Bug c++/13797] ICE igodard at pacbell dot net
@ 2004-01-21 20:25 ` igodard at pacbell dot net
2004-01-21 20:51 ` bangerth at dealii dot org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: igodard at pacbell dot net @ 2004-01-21 20:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From igodard at pacbell dot net 2004-01-21 20:25 -------
Created an attachment (id=5548)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5548&action=view)
Compiler output (-v -save-temps)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13797
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/13797] ICE
2004-01-21 20:23 [Bug c++/13797] New: ICE igodard at pacbell dot net
2004-01-21 20:24 ` [Bug c++/13797] ICE igodard at pacbell dot net
2004-01-21 20:25 ` igodard at pacbell dot net
@ 2004-01-21 20:51 ` bangerth at dealii dot org
2004-01-22 21:14 ` [Bug c++/13797] [3.3/34./3.5 regression] ICE on invalid template parameter reichelt at gcc dot gnu dot org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: bangerth at dealii dot org @ 2004-01-21 20:51 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-01-21 20:50 -------
Confirmed. An ice-after-error. I don't have the time to reduce this
at the moment, though, so I'll leave it to others.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13797
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/13797] [3.3/34./3.5 regression] ICE on invalid template parameter
2004-01-21 20:23 [Bug c++/13797] New: ICE igodard at pacbell dot net
` (2 preceding siblings ...)
2004-01-21 20:51 ` bangerth at dealii dot org
@ 2004-01-22 21:14 ` reichelt at gcc dot gnu dot org
2004-01-23 14:10 ` [Bug c++/13797] [3.3/3.4/3.5 " lerdsuwa at gcc dot gnu dot org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-01-22 21:14 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From reichelt at gcc dot gnu dot org 2004-01-22 21:14 -------
Here's a reduced testcase.
=======================================
template <int> struct A
{
typedef A<0> B;
template <B> struct B {};
};
A<0> a;
=======================================
With gcc 3.4.0 20031229 I get
PR13797.cc:4: error: `struct A<0>' is not a valid type for a template constant
parameter
PR13797.cc:4: error: declaration of `template<int <anonymous> > template<void
<anonymous> > struct A<<anonymous> >::B'
PR13797.cc:3: error: conflicts with previous declaration `typedef struct A<0>
A<<anonymous> >::B'
PR13797.cc: In instantiation of `A<0>':
PR13797.cc:7: instantiated from here
PR13797.cc:3: error: `void' is not a valid type for a template constant
parameter
PR13797.cc:3: internal compiler error: in instantiate_class_template, at
cp/pt.c:5384
Please submit a full bug report,
If I replace line 4 with
template <B> struct C {};
I get:
PR13797.cc:4: error: `struct A<0>' is not a valid type for a template constant
parameter
PR13797.cc: In instantiation of `A<0>':
PR13797.cc:7: instantiated from here
PR13797.cc:4: error: `void' is not a valid type for a template constant
parameter
PR13797.cc:4: internal compiler error: tree check: expected record_type, have
error_mark in tsubst_decl, at cp/pt.c:5917
Please submit a full bug report,
GCC 2.95.3 issues a correct error message (thus we have a regression),
3.0 - 3.3.x go into an endless loop outputting the same error message
over and over again.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
Severity|normal |minor
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |error-recovery, ice-on-
| |invalid-code
Last reconfirmed|0000-00-00 00:00:00 |2004-01-22 21:14:31
date| |
Summary|ICE |[3.3/34./3.5 regression] ICE
| |on invalid template
| |parameter
Target Milestone|--- |3.3.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13797
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/13797] [3.3/3.4/3.5 regression] ICE on invalid template parameter
2004-01-21 20:23 [Bug c++/13797] New: ICE igodard at pacbell dot net
` (3 preceding siblings ...)
2004-01-22 21:14 ` [Bug c++/13797] [3.3/34./3.5 regression] ICE on invalid template parameter reichelt at gcc dot gnu dot org
@ 2004-01-23 14:10 ` lerdsuwa at gcc dot gnu dot org
2004-01-25 14:18 ` cvs-commit at gcc dot gnu dot org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-01-23 14:10 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |lerdsuwa at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13797
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/13797] [3.3/3.4/3.5 regression] ICE on invalid template parameter
2004-01-21 20:23 [Bug c++/13797] New: ICE igodard at pacbell dot net
` (4 preceding siblings ...)
2004-01-23 14:10 ` [Bug c++/13797] [3.3/3.4/3.5 " lerdsuwa at gcc dot gnu dot org
@ 2004-01-25 14:18 ` cvs-commit at gcc dot gnu dot org
2004-01-25 14:30 ` cvs-commit at gcc dot gnu dot org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-01-25 14:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-01-25 14:18 -------
Subject: Bug 13797
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: lerdsuwa@gcc.gnu.org 2004-01-25 14:18:19
Modified files:
gcc/cp : ChangeLog pt.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/template: nontype4.C nontype5.C
Log message:
PR c++/13797
* pt.c (instantiate_class_template): Add an error_mark_node
check.
(tsubst_decl) <TEMPLATE_DECL case>: Likewise.
* g++.dg/template/nontype4.C: New test.
* g++.dg/template/nontype5.C: Likewise.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3905&r2=1.3906
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.818&r2=1.819
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3417&r2=1.3418
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/nontype4.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/nontype5.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13797
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/13797] [3.3/3.4/3.5 regression] ICE on invalid template parameter
2004-01-21 20:23 [Bug c++/13797] New: ICE igodard at pacbell dot net
` (5 preceding siblings ...)
2004-01-25 14:18 ` cvs-commit at gcc dot gnu dot org
@ 2004-01-25 14:30 ` cvs-commit at gcc dot gnu dot org
2004-01-25 14:37 ` [Bug c++/13797] [3.3 " lerdsuwa at gcc dot gnu dot org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-01-25 14:30 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-01-25 14:30 -------
Subject: Bug 13797
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_4-branch
Changes by: lerdsuwa@gcc.gnu.org 2004-01-25 14:30:27
Modified files:
gcc/cp : ChangeLog pt.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/template: nontype4.C nontype5.C
Log message:
PR c++/13797
* pt.c (instantiate_class_template): Add an error_mark_node
check.
(tsubst_decl) <TEMPLATE_DECL case>: Likewise.
* g++.dg/template/nontype4.C: New test.
* g++.dg/template/nontype5.C: Likewise.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.11&r2=1.3892.2.12
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.816.2.2&r2=1.816.2.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.15&r2=1.3389.2.16
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/nontype4.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/nontype5.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13797
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/13797] [3.3 regression] ICE on invalid template parameter
2004-01-21 20:23 [Bug c++/13797] New: ICE igodard at pacbell dot net
` (6 preceding siblings ...)
2004-01-25 14:30 ` cvs-commit at gcc dot gnu dot org
@ 2004-01-25 14:37 ` lerdsuwa at gcc dot gnu dot org
2004-01-25 14:40 ` lerdsuwa at gcc dot gnu dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-01-25 14:37 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From lerdsuwa at gcc dot gnu dot org 2004-01-25 14:37 -------
Fixed in 3.4 and main line by
http://gcc.gnu.org/ml/gcc-patches/2004-01/msg02731.html
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|[3.3/3.4/3.5 regression] ICE|[3.3 regression] ICE on
|on invalid template |invalid template parameter
|parameter |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13797
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/13797] [3.3 regression] ICE on invalid template parameter
2004-01-21 20:23 [Bug c++/13797] New: ICE igodard at pacbell dot net
` (7 preceding siblings ...)
2004-01-25 14:37 ` [Bug c++/13797] [3.3 " lerdsuwa at gcc dot gnu dot org
@ 2004-01-25 14:40 ` lerdsuwa at gcc dot gnu dot org
2004-01-25 15:08 ` cvs-commit at gcc dot gnu dot org
2004-01-25 15:12 ` lerdsuwa at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-01-25 14:40 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From lerdsuwa at gcc dot gnu dot org 2004-01-25 14:40 -------
For 3.3 branch, a patch is available
http://gcc.gnu.org/ml/gcc-patches/2004-01/msg02732.html
however it only fixes the ICE exposed in the reduced testcases.
The original testSeries.ii is preprocessed with GCC 3.4 libstdc++
headers that GCC 3.3 refuses to compile and produces additional
ICE. This ICE is probably treated as won't fix.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13797
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/13797] [3.3 regression] ICE on invalid template parameter
2004-01-21 20:23 [Bug c++/13797] New: ICE igodard at pacbell dot net
` (8 preceding siblings ...)
2004-01-25 14:40 ` lerdsuwa at gcc dot gnu dot org
@ 2004-01-25 15:08 ` cvs-commit at gcc dot gnu dot org
2004-01-25 15:12 ` lerdsuwa at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-01-25 15:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-01-25 15:08 -------
Subject: Bug 13797
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_3-branch
Changes by: lerdsuwa@gcc.gnu.org 2004-01-25 15:08:20
Modified files:
gcc/cp : ChangeLog pt.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/template: nontype4.C nontype5.C memclass1.C
Log message:
PR c++/13797
* pt.c (instantiate_class_template): Add an error_mark_node
check.
(tsubst_decl) <TEMPLATE_DECL case>: Likewise.
Backport from mainline
2003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10555, c++/10576
* pt.c (lookup_template_class): Handle class template with
multiple levels of parameters when one of the levels contain
errors.
* g++.dg/template/nontype4.C: New test.
* g++.dg/template/nontype5.C: Likewise.
* g++.dg/template/memclass1.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.3076.2.242&r2=1.3076.2.243
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.635.2.41&r2=1.635.2.42
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.2261.2.352&r2=1.2261.2.353
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/nontype4.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.4.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/nontype5.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.4.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/memclass1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.2.16.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13797
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/13797] [3.3 regression] ICE on invalid template parameter
2004-01-21 20:23 [Bug c++/13797] New: ICE igodard at pacbell dot net
` (9 preceding siblings ...)
2004-01-25 15:08 ` cvs-commit at gcc dot gnu dot org
@ 2004-01-25 15:12 ` lerdsuwa at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-01-25 15:12 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From lerdsuwa at gcc dot gnu dot org 2004-01-25 15:12 -------
I'm closing this as fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13797
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2004-01-25 15:12 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-21 20:23 [Bug c++/13797] New: ICE igodard at pacbell dot net
2004-01-21 20:24 ` [Bug c++/13797] ICE igodard at pacbell dot net
2004-01-21 20:25 ` igodard at pacbell dot net
2004-01-21 20:51 ` bangerth at dealii dot org
2004-01-22 21:14 ` [Bug c++/13797] [3.3/34./3.5 regression] ICE on invalid template parameter reichelt at gcc dot gnu dot org
2004-01-23 14:10 ` [Bug c++/13797] [3.3/3.4/3.5 " lerdsuwa at gcc dot gnu dot org
2004-01-25 14:18 ` cvs-commit at gcc dot gnu dot org
2004-01-25 14:30 ` cvs-commit at gcc dot gnu dot org
2004-01-25 14:37 ` [Bug c++/13797] [3.3 " lerdsuwa at gcc dot gnu dot org
2004-01-25 14:40 ` lerdsuwa at gcc dot gnu dot org
2004-01-25 15:08 ` cvs-commit at gcc dot gnu dot org
2004-01-25 15:12 ` lerdsuwa 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).