public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/29020] New: [4.0/4.1/4.2 regression] ICE using A<N>::A instead of A<N> in friend declaration
@ 2006-09-11 19:28 reichelt at gcc dot gnu dot org
2006-09-11 19:39 ` [Bug c++/29020] " 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-09-11 19:28 UTC (permalink / raw)
To: gcc-bugs
The following (IMHO valid) code snippet triggers a segfault since GCC 3.4.0:
==================================================
template<int> struct A
{
void foo();
};
struct B
{
template<int N> friend void A<N>::A::foo();
};
==================================================
x1.cc:8: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]
Before the code was accepted.
--
Summary: [4.0/4.1/4.2 regression] ICE using A<N>::A instead of
A<N> in friend declaration
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: ice-on-valid-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=29020
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/29020] [4.0/4.1/4.2 regression] ICE using A<N>::A instead of A<N> in friend declaration
2006-09-11 19:28 [Bug c++/29020] New: [4.0/4.1/4.2 regression] ICE using A<N>::A instead of A<N> in friend declaration reichelt at gcc dot gnu dot org
@ 2006-09-11 19:39 ` reichelt at gcc dot gnu dot org
2006-09-12 5:49 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-09-11 19:39 UTC (permalink / raw)
To: gcc-bugs
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.0.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29020
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/29020] [4.0/4.1/4.2 regression] ICE using A<N>::A instead of A<N> in friend declaration
2006-09-11 19:28 [Bug c++/29020] New: [4.0/4.1/4.2 regression] ICE using A<N>::A instead of A<N> in friend declaration reichelt at gcc dot gnu dot org
2006-09-11 19:39 ` [Bug c++/29020] " reichelt at gcc dot gnu dot org
@ 2006-09-12 5:49 ` pinskia at gcc dot gnu dot org
2006-09-20 22:32 ` mmitchel at gcc dot gnu dot org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-12 5:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-09-12 05:49 -------
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 |2006-09-12 05:49:50
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29020
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/29020] [4.0/4.1/4.2 regression] ICE using A<N>::A instead of A<N> in friend declaration
2006-09-11 19:28 [Bug c++/29020] New: [4.0/4.1/4.2 regression] ICE using A<N>::A instead of A<N> in friend declaration reichelt at gcc dot gnu dot org
2006-09-11 19:39 ` [Bug c++/29020] " reichelt at gcc dot gnu dot org
2006-09-12 5:49 ` pinskia at gcc dot gnu dot org
@ 2006-09-20 22:32 ` mmitchel at gcc dot gnu dot org
2006-10-03 18:35 ` mmitchel at gcc dot gnu dot org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-09-20 22:32 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29020
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/29020] [4.0/4.1/4.2 regression] ICE using A<N>::A instead of A<N> in friend declaration
2006-09-11 19:28 [Bug c++/29020] New: [4.0/4.1/4.2 regression] ICE using A<N>::A instead of A<N> in friend declaration reichelt at gcc dot gnu dot org
` (2 preceding siblings ...)
2006-09-20 22:32 ` mmitchel at gcc dot gnu dot org
@ 2006-10-03 18:35 ` mmitchel at gcc dot gnu dot org
2006-10-04 6:54 ` 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-10-03 18:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from mmitchel at gcc dot gnu dot org 2006-10-03 18:35 -------
The bug here is that the parser is not resolving A<N>::A to A<N>; instead it is
treating that as a typename type. Since the qualified name is appearing in a
declaration, and since the containing class is a not a class template, we
should resolve the qualified name at this point.
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |mark at codesourcery dot com
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29020
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/29020] [4.0/4.1/4.2 regression] ICE using A<N>::A instead of A<N> in friend declaration
2006-09-11 19:28 [Bug c++/29020] New: [4.0/4.1/4.2 regression] ICE using A<N>::A instead of A<N> in friend declaration reichelt at gcc dot gnu dot org
` (3 preceding siblings ...)
2006-10-03 18:35 ` mmitchel at gcc dot gnu dot org
@ 2006-10-04 6:54 ` mmitchel at gcc dot gnu dot org
2006-10-04 7:03 ` [Bug c++/29020] [4.0/4.1 " mmitchel at gcc dot gnu dot org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-10-04 6:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from mmitchel at gcc dot gnu dot org 2006-10-04 06:54 -------
Subject: Bug 29020
Author: mmitchel
Date: Wed Oct 4 06:53:55 2006
New Revision: 117425
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117425
Log:
PR c++/29020
* friend.c (do_friend): Improve comments; add assertion.
* parser.c (cp_parser_nested_name_specifier_opt): Resolve
typenames for qualified names used in declarations, even when
caching qualified name lookup.
PR c++/29020
* g++.dg/template/friend48.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/template/friend48.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/friend.c
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29020
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/29020] [4.0/4.1 regression] ICE using A<N>::A instead of A<N> in friend declaration
2006-09-11 19:28 [Bug c++/29020] New: [4.0/4.1/4.2 regression] ICE using A<N>::A instead of A<N> in friend declaration reichelt at gcc dot gnu dot org
` (4 preceding siblings ...)
2006-10-04 6:54 ` mmitchel at gcc dot gnu dot org
@ 2006-10-04 7:03 ` mmitchel at gcc dot gnu dot org
2006-10-23 19:32 ` [Bug c++/29020] [4.0 " reichelt at gcc dot gnu dot org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-10-04 7:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from mmitchel at gcc dot gnu dot org 2006-10-04 07:03 -------
Fixed in 4.2.0.
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.0/4.1/4.2 regression] ICE|[4.0/4.1 regression] ICE
|using A<N>::A instead of |using A<N>::A instead of
|A<N> in friend declaration |A<N> in friend declaration
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29020
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/29020] [4.0 regression] ICE using A<N>::A instead of A<N> in friend declaration
2006-09-11 19:28 [Bug c++/29020] New: [4.0/4.1/4.2 regression] ICE using A<N>::A instead of A<N> in friend declaration reichelt at gcc dot gnu dot org
` (5 preceding siblings ...)
2006-10-04 7:03 ` [Bug c++/29020] [4.0/4.1 " mmitchel at gcc dot gnu dot org
@ 2006-10-23 19:32 ` reichelt at gcc dot gnu dot org
2006-10-24 3:58 ` mmitchel 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-10-23 19:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from reichelt at gcc dot gnu dot org 2006-10-23 19:32 -------
Mark, you accidentally committed the fix in parser.c with your patch
for PR 28506 (rev. 117695) to the 4.1 branch:
http://gcc.gnu.org/ml/gcc-cvs/2006-10/msg00361.html
So this is now fixed on the 4.1 branch, too.
For completeness sake, would you mind committing also
the hunk from friend.c and the testcase?
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.0/4.1 regression] ICE |[4.0 regression] ICE using
|using A<N>::A instead of |A<N>::A instead of A<N> in
|A<N> in friend declaration |friend declaration
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29020
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/29020] [4.0 regression] ICE using A<N>::A instead of A<N> in friend declaration
2006-09-11 19:28 [Bug c++/29020] New: [4.0/4.1/4.2 regression] ICE using A<N>::A instead of A<N> in friend declaration reichelt at gcc dot gnu dot org
` (6 preceding siblings ...)
2006-10-23 19:32 ` [Bug c++/29020] [4.0 " reichelt at gcc dot gnu dot org
@ 2006-10-24 3:58 ` mmitchel at gcc dot gnu dot org
2006-10-24 4:06 ` mmitchel at gcc dot gnu dot org
2007-02-03 20:03 ` gdr at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-10-24 3:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from mmitchel at gcc dot gnu dot org 2006-10-24 03:58 -------
Subject: Bug 29020
Author: mmitchel
Date: Tue Oct 24 03:58:40 2006
New Revision: 117994
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117994
Log:
PR c++/29020
* g++.dg/template/friend48.C: New test.
Added:
branches/gcc-4_1-branch/gcc/testsuite/g++.dg/template/friend48.C
Modified:
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29020
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/29020] [4.0 regression] ICE using A<N>::A instead of A<N> in friend declaration
2006-09-11 19:28 [Bug c++/29020] New: [4.0/4.1/4.2 regression] ICE using A<N>::A instead of A<N> in friend declaration reichelt at gcc dot gnu dot org
` (7 preceding siblings ...)
2006-10-24 3:58 ` mmitchel at gcc dot gnu dot org
@ 2006-10-24 4:06 ` mmitchel at gcc dot gnu dot org
2007-02-03 20:03 ` gdr at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-10-24 4:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from mmitchel at gcc dot gnu dot org 2006-10-24 04:06 -------
Volker --
Thank you for spotting this. I decided not to backport the friend.c changes
because the new asserts might somehow cause a problem. However, I have now
added the testcase, after verifying that it passed.
Thanks,
-- Mark
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29020
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/29020] [4.0 regression] ICE using A<N>::A instead of A<N> in friend declaration
2006-09-11 19:28 [Bug c++/29020] New: [4.0/4.1/4.2 regression] ICE using A<N>::A instead of A<N> in friend declaration reichelt at gcc dot gnu dot org
` (8 preceding siblings ...)
2006-10-24 4:06 ` mmitchel at gcc dot gnu dot org
@ 2007-02-03 20:03 ` gdr at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: gdr at gcc dot gnu dot org @ 2007-02-03 20:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from gdr at gcc dot gnu dot org 2007-02-03 20:03 -------
Fixed in GCC-4.1.2.
--
gdr at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|4.0.4 |4.1.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29020
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2007-02-03 20:03 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-11 19:28 [Bug c++/29020] New: [4.0/4.1/4.2 regression] ICE using A<N>::A instead of A<N> in friend declaration reichelt at gcc dot gnu dot org
2006-09-11 19:39 ` [Bug c++/29020] " reichelt at gcc dot gnu dot org
2006-09-12 5:49 ` pinskia at gcc dot gnu dot org
2006-09-20 22:32 ` mmitchel at gcc dot gnu dot org
2006-10-03 18:35 ` mmitchel at gcc dot gnu dot org
2006-10-04 6:54 ` mmitchel at gcc dot gnu dot org
2006-10-04 7:03 ` [Bug c++/29020] [4.0/4.1 " mmitchel at gcc dot gnu dot org
2006-10-23 19:32 ` [Bug c++/29020] [4.0 " reichelt at gcc dot gnu dot org
2006-10-24 3:58 ` mmitchel at gcc dot gnu dot org
2006-10-24 4:06 ` mmitchel at gcc dot gnu dot org
2007-02-03 20:03 ` gdr 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).