public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/28114] New: [4.0/4.1/4.2 regression] ICE with struct definition in argument of template function
@ 2006-06-20 21:14 reichelt at gcc dot gnu dot org
2006-06-20 21:34 ` [Bug c++/28114] " pinskia at gcc dot gnu dot org
` (12 more replies)
0 siblings, 13 replies; 14+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-06-20 21:14 UTC (permalink / raw)
To: gcc-bugs
The following invalid testcase causes an ICE since GCC 4.0.0:
===========================================
template<int> void foo(struct {}*);
void bar()
{
foo<0>(0);
}
===========================================
bug.cc:1: error: template class without a name
bug.cc:1: error: types may not be defined in parameter types
bug.cc:5: error: conflicting declaration 'struct<anonymous>'
bug.cc:5: error: 'struct<anonymous>' has a previous declaration as
'struct<anonymous>'
bug.cc: In function 'void bar()':
bug.cc:5: internal compiler error: tree check: expected tree that contains
'decl minimal' structure, have 'error_mark' in pushtag, at
cp/name-lookup.c:4865
Please submit a full bug report, [etc.]
Moreover only the second line of the error message makes sense.
The "conflicting declaration" message is completely bogus, and the
first line looks bogus to me, too.
--
Summary: [4.0/4.1/4.2 regression] ICE with struct definition in
argument of template function
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code, error-recovery, diagnostic,
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=28114
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/28114] [4.0/4.1/4.2 regression] ICE with struct definition in argument of template function
2006-06-20 21:14 [Bug c++/28114] New: [4.0/4.1/4.2 regression] ICE with struct definition in argument of template function reichelt at gcc dot gnu dot org
@ 2006-06-20 21:34 ` pinskia at gcc dot gnu dot org
2006-06-22 16:40 ` sje at cup dot hp dot com
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-20 21:34 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.0.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28114
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/28114] [4.0/4.1/4.2 regression] ICE with struct definition in argument of template function
2006-06-20 21:14 [Bug c++/28114] New: [4.0/4.1/4.2 regression] ICE with struct definition in argument of template function reichelt at gcc dot gnu dot org
2006-06-20 21:34 ` [Bug c++/28114] " pinskia at gcc dot gnu dot org
@ 2006-06-22 16:40 ` sje at cup dot hp dot com
2006-06-23 23:13 ` sje at gcc dot gnu dot org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: sje at cup dot hp dot com @ 2006-06-22 16:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from sje at cup dot hp dot com 2006-06-22 16:38 -------
Proposed patch at http://gcc.gnu.org/ml/gcc-patches/2006-06/msg01234.html
--
sje at cup dot hp dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sje at cup dot hp dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28114
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/28114] [4.0/4.1/4.2 regression] ICE with struct definition in argument of template function
2006-06-20 21:14 [Bug c++/28114] New: [4.0/4.1/4.2 regression] ICE with struct definition in argument of template function reichelt at gcc dot gnu dot org
2006-06-20 21:34 ` [Bug c++/28114] " pinskia at gcc dot gnu dot org
2006-06-22 16:40 ` sje at cup dot hp dot com
@ 2006-06-23 23:13 ` sje at gcc dot gnu dot org
2006-06-24 2:03 ` [Bug c++/28114] [4.0/4.1 " pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: sje at gcc dot gnu dot org @ 2006-06-23 23:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from sje at gcc dot gnu dot org 2006-06-23 21:58 -------
Subject: Bug 28114
Author: sje
Date: Fri Jun 23 21:58:25 2006
New Revision: 114953
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114953
Log:
PR c++/28114
* name-lookup.c (pushtag): Return if we have error_mark_node.
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/name-lookup.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28114
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/28114] [4.0/4.1 regression] ICE with struct definition in argument of template function
2006-06-20 21:14 [Bug c++/28114] New: [4.0/4.1/4.2 regression] ICE with struct definition in argument of template function reichelt at gcc dot gnu dot org
` (2 preceding siblings ...)
2006-06-23 23:13 ` sje at gcc dot gnu dot org
@ 2006-06-24 2:03 ` pinskia at gcc dot gnu dot org
2006-06-26 21:50 ` sje at gcc dot gnu dot org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-24 2:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2006-06-24 01:53 -------
Confirmed, fixed at least on the mainline.
--
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 |2006-06-24 01:53:09
date| |
Summary|[4.0/4.1/4.2 regression] ICE|[4.0/4.1 regression] ICE
|with struct definition in |with struct definition in
|argument of template |argument of template
|function |function
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28114
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/28114] [4.0/4.1 regression] ICE with struct definition in argument of template function
2006-06-20 21:14 [Bug c++/28114] New: [4.0/4.1/4.2 regression] ICE with struct definition in argument of template function reichelt at gcc dot gnu dot org
` (3 preceding siblings ...)
2006-06-24 2:03 ` [Bug c++/28114] [4.0/4.1 " pinskia at gcc dot gnu dot org
@ 2006-06-26 21:50 ` sje at gcc dot gnu dot org
2006-07-10 20:42 ` sje at gcc dot gnu dot org
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: sje at gcc dot gnu dot org @ 2006-06-26 21:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from sje at gcc dot gnu dot org 2006-06-26 21:25 -------
Subject: Bug 28114
Author: sje
Date: Mon Jun 26 21:25:23 2006
New Revision: 115025
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115025
Log:
PR c++/28114
* g++.dg/other/pr28114.C: New.
Added:
trunk/gcc/testsuite/g++.dg/other/pr28114.C
Modified:
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28114
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/28114] [4.0/4.1 regression] ICE with struct definition in argument of template function
2006-06-20 21:14 [Bug c++/28114] New: [4.0/4.1/4.2 regression] ICE with struct definition in argument of template function reichelt at gcc dot gnu dot org
` (4 preceding siblings ...)
2006-06-26 21:50 ` sje at gcc dot gnu dot org
@ 2006-07-10 20:42 ` sje at gcc dot gnu dot org
2006-07-10 20:43 ` sje at gcc dot gnu dot org
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: sje at gcc dot gnu dot org @ 2006-07-10 20:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from sje at gcc dot gnu dot org 2006-07-10 20:42 -------
Subject: Bug 28114
Author: sje
Date: Mon Jul 10 20:42:14 2006
New Revision: 115314
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115314
Log:
PR c++/28114
* name-lookup.c (pushtag): Return if we have error_mark_node.
Modified:
branches/gcc-4_1-branch/gcc/cp/ChangeLog
branches/gcc-4_1-branch/gcc/cp/name-lookup.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28114
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/28114] [4.0/4.1 regression] ICE with struct definition in argument of template function
2006-06-20 21:14 [Bug c++/28114] New: [4.0/4.1/4.2 regression] ICE with struct definition in argument of template function reichelt at gcc dot gnu dot org
` (5 preceding siblings ...)
2006-07-10 20:42 ` sje at gcc dot gnu dot org
@ 2006-07-10 20:43 ` sje at gcc dot gnu dot org
2006-07-10 20:46 ` sje at cup dot hp dot com
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: sje at gcc dot gnu dot org @ 2006-07-10 20:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from sje at gcc dot gnu dot org 2006-07-10 20:43 -------
Subject: Bug 28114
Author: sje
Date: Mon Jul 10 20:43:34 2006
New Revision: 115315
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115315
Log:
PR c++/28114
* g++.dg/other/pr28114.C: New.
Added:
branches/gcc-4_1-branch/gcc/testsuite/g++.dg/other/pr28114.C
Modified:
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28114
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/28114] [4.0/4.1 regression] ICE with struct definition in argument of template function
2006-06-20 21:14 [Bug c++/28114] New: [4.0/4.1/4.2 regression] ICE with struct definition in argument of template function reichelt at gcc dot gnu dot org
` (6 preceding siblings ...)
2006-07-10 20:43 ` sje at gcc dot gnu dot org
@ 2006-07-10 20:46 ` sje at cup dot hp dot com
2006-07-11 9:15 ` reichelt at igpm dot rwth-aachen dot de
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: sje at cup dot hp dot com @ 2006-07-10 20:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from sje at cup dot hp dot com 2006-07-10 20:46 -------
I have checked in a patch for ToT and on the 4.1 branch. My inclination is to
not fix this on the 4.0 branch because the patch doesn't apply automatically.
The same change is probably needed somewhere else for 4.0, but I don't think it
is worth the trouble to find out where. Should I close this out as fixed in
4.1.2?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28114
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/28114] [4.0/4.1 regression] ICE with struct definition in argument of template function
2006-06-20 21:14 [Bug c++/28114] New: [4.0/4.1/4.2 regression] ICE with struct definition in argument of template function reichelt at gcc dot gnu dot org
` (7 preceding siblings ...)
2006-07-10 20:46 ` sje at cup dot hp dot com
@ 2006-07-11 9:15 ` reichelt at igpm dot rwth-aachen dot de
2006-07-11 20:57 ` sje at cup dot hp dot com
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: reichelt at igpm dot rwth-aachen dot de @ 2006-07-11 9:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from reichelt at igpm dot rwth-aachen dot de 2006-07-11 09:15 -------
Subject: Re: [4.0/4.1 regression] ICE with struct definition in
argument of template function
On 10 Jul, sje at cup dot hp dot com wrote:
>
>
> ------- Comment #7 from sje at cup dot hp dot com 2006-07-10 20:46 -------
> I have checked in a patch for ToT and on the 4.1 branch. My inclination is to
> not fix this on the 4.0 branch because the patch doesn't apply automatically.
> The same change is probably needed somewhere else for 4.0, but I don't think it
> is worth the trouble to find out where.
Well, with some trivial changes (whitespace, different number of
parameters for pushdecl_with_scope) the patch applies to the 4.0 branch:
===================================================================
--- gcc/gcc/cp/name-lookup.c (revision 115324)
+++ gcc/gcc/cp/name-lookup.c (working copy)
@@ -4666,7 +4666,11 @@ pushtag (tree name, tree type, tag_scope
pushdecl_class_level (decl);
}
else if (b->kind != sk_template_parms)
- decl = pushdecl_with_scope (decl, b);
+ {
+ decl = pushdecl_with_scope (decl, b);
+ if (decl == error_mark_node)
+ POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, decl);
+ }
/* FIXME what if it gets a name from typedef? */
if (ANON_AGGRNAME_P (name))
===================================================================
Would you mind testing this on the 4.0 branch? Or should I do that?
> Should I close this out as fixed in 4.1.2?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28114
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/28114] [4.0/4.1 regression] ICE with struct definition in argument of template function
2006-06-20 21:14 [Bug c++/28114] New: [4.0/4.1/4.2 regression] ICE with struct definition in argument of template function reichelt at gcc dot gnu dot org
` (8 preceding siblings ...)
2006-07-11 9:15 ` reichelt at igpm dot rwth-aachen dot de
@ 2006-07-11 20:57 ` sje at cup dot hp dot com
2006-07-12 21:46 ` sje at gcc dot gnu dot org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: sje at cup dot hp dot com @ 2006-07-11 20:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from sje at cup dot hp dot com 2006-07-11 20:56 -------
I am testing on the 4.0 branch now.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28114
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/28114] [4.0/4.1 regression] ICE with struct definition in argument of template function
2006-06-20 21:14 [Bug c++/28114] New: [4.0/4.1/4.2 regression] ICE with struct definition in argument of template function reichelt at gcc dot gnu dot org
` (9 preceding siblings ...)
2006-07-11 20:57 ` sje at cup dot hp dot com
@ 2006-07-12 21:46 ` sje at gcc dot gnu dot org
2006-07-12 21:48 ` sje at gcc dot gnu dot org
2006-07-13 13:02 ` [Bug c++/28114] [4.0/4.1/4.2 " reichelt at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: sje at gcc dot gnu dot org @ 2006-07-12 21:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from sje at gcc dot gnu dot org 2006-07-12 21:46 -------
Subject: Bug 28114
Author: sje
Date: Wed Jul 12 21:46:43 2006
New Revision: 115397
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115397
Log:
PR c++/28114
* name-lookup.c (pushtag): Return if we have error_mark_node.
Modified:
branches/gcc-4_0-branch/gcc/cp/ChangeLog
branches/gcc-4_0-branch/gcc/cp/name-lookup.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28114
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/28114] [4.0/4.1 regression] ICE with struct definition in argument of template function
2006-06-20 21:14 [Bug c++/28114] New: [4.0/4.1/4.2 regression] ICE with struct definition in argument of template function reichelt at gcc dot gnu dot org
` (10 preceding siblings ...)
2006-07-12 21:46 ` sje at gcc dot gnu dot org
@ 2006-07-12 21:48 ` sje at gcc dot gnu dot org
2006-07-13 13:02 ` [Bug c++/28114] [4.0/4.1/4.2 " reichelt at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: sje at gcc dot gnu dot org @ 2006-07-12 21:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from sje at gcc dot gnu dot org 2006-07-12 21:48 -------
Subject: Bug 28114
Author: sje
Date: Wed Jul 12 21:47:58 2006
New Revision: 115398
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115398
Log:
PR c++/28114
* g++.dg/other/pr28114.C: New.
Added:
branches/gcc-4_0-branch/gcc/testsuite/g++.dg/other/pr28114.C
Modified:
branches/gcc-4_0-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28114
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/28114] [4.0/4.1/4.2 regression] ICE with struct definition in argument of template function
2006-06-20 21:14 [Bug c++/28114] New: [4.0/4.1/4.2 regression] ICE with struct definition in argument of template function reichelt at gcc dot gnu dot org
` (11 preceding siblings ...)
2006-07-12 21:48 ` sje at gcc dot gnu dot org
@ 2006-07-13 13:02 ` reichelt at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-07-13 13:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from reichelt at gcc dot gnu dot org 2006-07-13 13:02 -------
Fixed on mainline, 4.1 branch, and 4.0 branch.
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Summary|[4.0/4.1 regression] ICE |[4.0/4.1/4.2 regression] ICE
|with struct definition in |with struct definition in
|argument of template |argument of template
|function |function
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28114
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2006-07-13 13:02 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-20 21:14 [Bug c++/28114] New: [4.0/4.1/4.2 regression] ICE with struct definition in argument of template function reichelt at gcc dot gnu dot org
2006-06-20 21:34 ` [Bug c++/28114] " pinskia at gcc dot gnu dot org
2006-06-22 16:40 ` sje at cup dot hp dot com
2006-06-23 23:13 ` sje at gcc dot gnu dot org
2006-06-24 2:03 ` [Bug c++/28114] [4.0/4.1 " pinskia at gcc dot gnu dot org
2006-06-26 21:50 ` sje at gcc dot gnu dot org
2006-07-10 20:42 ` sje at gcc dot gnu dot org
2006-07-10 20:43 ` sje at gcc dot gnu dot org
2006-07-10 20:46 ` sje at cup dot hp dot com
2006-07-11 9:15 ` reichelt at igpm dot rwth-aachen dot de
2006-07-11 20:57 ` sje at cup dot hp dot com
2006-07-12 21:46 ` sje at gcc dot gnu dot org
2006-07-12 21:48 ` sje at gcc dot gnu dot org
2006-07-13 13:02 ` [Bug c++/28114] [4.0/4.1/4.2 " 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).