public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/27572] New: [4.0/4.1/4.2 regression] ICE on typedef in parameter declaration
@ 2006-05-12 9:44 reichelt at gcc dot gnu dot org
2006-05-12 9:47 ` [Bug c++/27572] " reichelt at gcc dot gnu dot org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-05-12 9:44 UTC (permalink / raw)
To: gcc-bugs
The C++ frontend currently chokes on invalid typedefs in parameter
declarations for both functions and templates.
One can generate ICEs in many different places like the following
examples show:
======================================
void foo(typedef) {}
======================================
bug.cc:1: error: ISO C++ forbids declaration of 'parameter' with no type
bug.cc:1: error: typedef declaration invalid in parameter declaration
bug.cc: In function 'void foo(int)':
bug.cc:1: internal compiler error: tree check: expected tree that contains
'decl with RTL' structure, have 'type_decl' in set_decl_rtl, at emit-rtl.c:949
Please submit a full bug report, [etc.]
======================================
void foo(typedef x[]) {}
======================================
ICE in pop_binding, at cp/name-lookup.c:380
======================================
template<typedef> void foo();
void bar()
{
foo<int>();
}
======================================
ICE in instantiate_decl, at cp/pt.c:11703
======================================
template<typedef,int> struct A;
======================================
tree check ICE: expected template_type_parm or template_template_parm or
bound_template_template_parm, have integer_type in process_template_parm, at
cp/pt.c:2336
======================================
template<typedef> struct A
{
void foo();
void bar();
};
A<int> a;
======================================
ICE in finish_member_declaration, at cp/semantics.c:2212
======================================
template<typedef> struct A
{
friend void foo();
};
A<int> a;
======================================
ICE in tsubst_decl, at cp/pt.c:6263
Some of these examples crash since GCC 2.95.3, but some (like the first
and last) since 3.4.0, so this is a regression.
Patch to follow.
--
Summary: [4.0/4.1/4.2 regression] ICE on typedef in parameter
declaration
Product: gcc
Version: 4.2.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=27572
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/27572] [4.0/4.1/4.2 regression] ICE on typedef in parameter declaration
2006-05-12 9:44 [Bug c++/27572] New: [4.0/4.1/4.2 regression] ICE on typedef in parameter declaration reichelt at gcc dot gnu dot org
@ 2006-05-12 9:47 ` reichelt at gcc dot gnu dot org
2006-05-12 9:48 ` patchapp at dberlin dot org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-05-12 9:47 UTC (permalink / raw)
To: gcc-bugs
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |reichelt at gcc dot gnu dot
|dot org |org
URL| |http://gcc.gnu.org/ml/gcc-
| |patches/2006-
| |05/msg00502.html
Target Milestone|--- |4.0.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27572
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/27572] [4.0/4.1/4.2 regression] ICE on typedef in parameter declaration
2006-05-12 9:44 [Bug c++/27572] New: [4.0/4.1/4.2 regression] ICE on typedef in parameter declaration reichelt at gcc dot gnu dot org
2006-05-12 9:47 ` [Bug c++/27572] " reichelt at gcc dot gnu dot org
@ 2006-05-12 9:48 ` patchapp at dberlin dot org
2006-05-12 19:36 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: patchapp at dberlin dot org @ 2006-05-12 9:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from patchapp at dberlin dot org 2006-05-12 09:47 -------
Subject: Bug number PR c++/27572
A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-05/msg00502.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27572
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/27572] [4.0/4.1/4.2 regression] ICE on typedef in parameter declaration
2006-05-12 9:44 [Bug c++/27572] New: [4.0/4.1/4.2 regression] ICE on typedef in parameter declaration reichelt at gcc dot gnu dot org
2006-05-12 9:47 ` [Bug c++/27572] " reichelt at gcc dot gnu dot org
2006-05-12 9:48 ` patchapp at dberlin dot org
@ 2006-05-12 19:36 ` pinskia at gcc dot gnu dot org
2006-06-04 19:02 ` mmitchel at gcc dot gnu dot org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-12 19:36 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-05-12 19:36:31
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27572
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/27572] [4.0/4.1/4.2 regression] ICE on typedef in parameter declaration
2006-05-12 9:44 [Bug c++/27572] New: [4.0/4.1/4.2 regression] ICE on typedef in parameter declaration reichelt at gcc dot gnu dot org
` (2 preceding siblings ...)
2006-05-12 19:36 ` pinskia at gcc dot gnu dot org
@ 2006-06-04 19:02 ` mmitchel at gcc dot gnu dot org
2006-07-17 3:24 ` mmitchel at gcc dot gnu dot org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-04 19:02 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27572
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/27572] [4.0/4.1/4.2 regression] ICE on typedef in parameter declaration
2006-05-12 9:44 [Bug c++/27572] New: [4.0/4.1/4.2 regression] ICE on typedef in parameter declaration reichelt at gcc dot gnu dot org
` (3 preceding siblings ...)
2006-06-04 19:02 ` mmitchel at gcc dot gnu dot org
@ 2006-07-17 3:24 ` mmitchel at gcc dot gnu dot org
2006-07-24 14:15 ` patchapp at dberlin dot org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-07-17 3:24 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P2 |P4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27572
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/27572] [4.0/4.1/4.2 regression] ICE on typedef in parameter declaration
2006-05-12 9:44 [Bug c++/27572] New: [4.0/4.1/4.2 regression] ICE on typedef in parameter declaration reichelt at gcc dot gnu dot org
` (4 preceding siblings ...)
2006-07-17 3:24 ` mmitchel at gcc dot gnu dot org
@ 2006-07-24 14:15 ` patchapp at dberlin dot org
2006-07-25 0:57 ` reichelt at gcc dot gnu dot org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: patchapp at dberlin dot org @ 2006-07-24 14:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from patchapp at dberlin dot org 2006-07-24 14:15 -------
Subject: Bug number PR c++/27572
A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-07/msg01036.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27572
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/27572] [4.0/4.1/4.2 regression] ICE on typedef in parameter declaration
2006-05-12 9:44 [Bug c++/27572] New: [4.0/4.1/4.2 regression] ICE on typedef in parameter declaration reichelt at gcc dot gnu dot org
` (5 preceding siblings ...)
2006-07-24 14:15 ` patchapp at dberlin dot org
@ 2006-07-25 0:57 ` reichelt at gcc dot gnu dot org
2006-07-25 1:02 ` reichelt at gcc dot gnu dot org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-07-25 0:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from reichelt at gcc dot gnu dot org 2006-07-25 00:57 -------
Subject: Bug 27572
Author: reichelt
Date: Tue Jul 25 00:57:10 2006
New Revision: 115729
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115729
Log:
PR c++/27572
* decl.c (grokdeclarator): Return error_mark_node after invalid
typedef.
* g++.dg/other/typedef1.C: New test.
* g++.dg/template/typedef4.C: New test.
* g++.dg/template/typedef5.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/other/typedef1.C
trunk/gcc/testsuite/g++.dg/template/typedef4.C
trunk/gcc/testsuite/g++.dg/template/typedef5.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27572
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/27572] [4.0/4.1/4.2 regression] ICE on typedef in parameter declaration
2006-05-12 9:44 [Bug c++/27572] New: [4.0/4.1/4.2 regression] ICE on typedef in parameter declaration reichelt at gcc dot gnu dot org
` (6 preceding siblings ...)
2006-07-25 0:57 ` reichelt at gcc dot gnu dot org
@ 2006-07-25 1:02 ` reichelt at gcc dot gnu dot org
2006-07-25 1:06 ` reichelt at gcc dot gnu dot org
2006-07-25 1:55 ` reichelt at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-07-25 1:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from reichelt at gcc dot gnu dot org 2006-07-25 01:02 -------
Subject: Bug 27572
Author: reichelt
Date: Tue Jul 25 01:02:08 2006
New Revision: 115730
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115730
Log:
PR c++/27572
* decl.c (grokdeclarator): Return error_mark_node after invalid
typedef.
* g++.dg/other/typedef1.C: New test.
* g++.dg/template/typedef4.C: New test.
* g++.dg/template/typedef5.C: New test.
Added:
branches/gcc-4_1-branch/gcc/testsuite/g++.dg/other/typedef1.C
branches/gcc-4_1-branch/gcc/testsuite/g++.dg/template/typedef4.C
branches/gcc-4_1-branch/gcc/testsuite/g++.dg/template/typedef5.C
Modified:
branches/gcc-4_1-branch/gcc/cp/ChangeLog
branches/gcc-4_1-branch/gcc/cp/decl.c
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27572
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/27572] [4.0/4.1/4.2 regression] ICE on typedef in parameter declaration
2006-05-12 9:44 [Bug c++/27572] New: [4.0/4.1/4.2 regression] ICE on typedef in parameter declaration reichelt at gcc dot gnu dot org
` (7 preceding siblings ...)
2006-07-25 1:02 ` reichelt at gcc dot gnu dot org
@ 2006-07-25 1:06 ` reichelt at gcc dot gnu dot org
2006-07-25 1:55 ` reichelt at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-07-25 1:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from reichelt at gcc dot gnu dot org 2006-07-25 01:06 -------
Subject: Bug 27572
Author: reichelt
Date: Tue Jul 25 01:06:15 2006
New Revision: 115731
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115731
Log:
PR c++/27572
* decl.c (grokdeclarator): Return error_mark_node after invalid
typedef.
* g++.dg/other/typedef1.C: New test.
* g++.dg/template/typedef4.C: New test.
* g++.dg/template/typedef5.C: New test.
Added:
branches/gcc-4_0-branch/gcc/testsuite/g++.dg/other/typedef1.C
branches/gcc-4_0-branch/gcc/testsuite/g++.dg/template/typedef4.C
branches/gcc-4_0-branch/gcc/testsuite/g++.dg/template/typedef5.C
Modified:
branches/gcc-4_0-branch/gcc/cp/ChangeLog
branches/gcc-4_0-branch/gcc/cp/decl.c
branches/gcc-4_0-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27572
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/27572] [4.0/4.1/4.2 regression] ICE on typedef in parameter declaration
2006-05-12 9:44 [Bug c++/27572] New: [4.0/4.1/4.2 regression] ICE on typedef in parameter declaration reichelt at gcc dot gnu dot org
` (8 preceding siblings ...)
2006-07-25 1:06 ` reichelt at gcc dot gnu dot org
@ 2006-07-25 1:55 ` reichelt at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-07-25 1:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from reichelt at gcc dot gnu dot org 2006-07-25 01:55 -------
Fixed on mainline, 4.1 branch, and 4.0 branch.
Some of the testcases still crash, but they crash in
get_innermost_template_args.
This problem is tracked in PR 27397.
--
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=27572
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2006-07-25 1:55 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-12 9:44 [Bug c++/27572] New: [4.0/4.1/4.2 regression] ICE on typedef in parameter declaration reichelt at gcc dot gnu dot org
2006-05-12 9:47 ` [Bug c++/27572] " reichelt at gcc dot gnu dot org
2006-05-12 9:48 ` patchapp at dberlin dot org
2006-05-12 19:36 ` pinskia at gcc dot gnu dot org
2006-06-04 19:02 ` mmitchel at gcc dot gnu dot org
2006-07-17 3:24 ` mmitchel at gcc dot gnu dot org
2006-07-24 14:15 ` patchapp at dberlin dot org
2006-07-25 0:57 ` reichelt at gcc dot gnu dot org
2006-07-25 1:02 ` reichelt at gcc dot gnu dot org
2006-07-25 1:06 ` reichelt at gcc dot gnu dot org
2006-07-25 1:55 ` 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).