public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/27496] New: ICE on broken templated friend
@ 2006-05-08 15:37 reichelt at gcc dot gnu dot org
2006-05-08 15:38 ` [Bug c++/27496] " reichelt at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-05-08 15:37 UTC (permalink / raw)
To: gcc-bugs
The following invalid code snippet causes an ICE since GCC 3.0:
===================================
template<int> struct A
{
template<void> friend class X;
};
A<0> a;
===================================
bug.cc:3: error: 'void' is not a valid type for a template constant parameter
bug.cc: In instantiation of 'A<0>':
bug.cc:6: instantiated from here
bug.cc:3: error: 'void' is not a valid type for a template constant parameter
bug.cc:3: internal compiler error: tree check: expected tree that contains
'decl common' structure, have 'error_mark' in tsubst_friend_class, at
cp/pt.c:5443
Please submit a full bug report, [etc.]
GCC 2.95.3 wrongly accepted the code.
--
Summary: ICE on broken templated friend
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=27496
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/27496] ICE on broken templated friend
2006-05-08 15:37 [Bug c++/27496] New: ICE on broken templated friend reichelt at gcc dot gnu dot org
@ 2006-05-08 15:38 ` reichelt at gcc dot gnu dot org
2006-05-08 15:46 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-05-08 15:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from reichelt at gcc dot gnu dot org 2006-05-08 15:38 -------
Testing a patch.
--
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
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27496
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/27496] ICE on broken templated friend
2006-05-08 15:37 [Bug c++/27496] New: ICE on broken templated friend reichelt at gcc dot gnu dot org
2006-05-08 15:38 ` [Bug c++/27496] " reichelt at gcc dot gnu dot org
@ 2006-05-08 15:46 ` pinskia at gcc dot gnu dot org
2006-05-09 14:51 ` patchapp at dberlin dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-08 15:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-05-08 15:46 -------
Confirmed.
--
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-08 15:46:05
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27496
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/27496] ICE on broken templated friend
2006-05-08 15:37 [Bug c++/27496] New: ICE on broken templated friend reichelt at gcc dot gnu dot org
2006-05-08 15:38 ` [Bug c++/27496] " reichelt at gcc dot gnu dot org
2006-05-08 15:46 ` pinskia at gcc dot gnu dot org
@ 2006-05-09 14:51 ` patchapp at dberlin dot org
2006-05-15 8:53 ` reichelt at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: patchapp at dberlin dot org @ 2006-05-09 14:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from patchapp at dberlin dot org 2006-05-09 14:51 -------
Subject: Bug number PR c++/27496
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/msg00333.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27496
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/27496] ICE on broken templated friend
2006-05-08 15:37 [Bug c++/27496] New: ICE on broken templated friend reichelt at gcc dot gnu dot org
` (2 preceding siblings ...)
2006-05-09 14:51 ` patchapp at dberlin dot org
@ 2006-05-15 8:53 ` reichelt at gcc dot gnu dot org
2006-05-15 9:01 ` reichelt at gcc dot gnu dot org
2006-05-15 19:37 ` patchapp at dberlin dot org
5 siblings, 0 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-05-15 8:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from reichelt at gcc dot gnu dot org 2006-05-15 08:52 -------
Subject: Bug 27496
Author: reichelt
Date: Mon May 15 08:52:29 2006
New Revision: 113776
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113776
Log:
PR c++/27496
* pt.c (tsubst_friend_class): Return early on invalid friend
declarations.
* g++.dg/template/void2.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/template/void2.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27496
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/27496] ICE on broken templated friend
2006-05-08 15:37 [Bug c++/27496] New: ICE on broken templated friend reichelt at gcc dot gnu dot org
` (3 preceding siblings ...)
2006-05-15 8:53 ` reichelt at gcc dot gnu dot org
@ 2006-05-15 9:01 ` reichelt at gcc dot gnu dot org
2006-05-15 19:37 ` patchapp at dberlin dot org
5 siblings, 0 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-05-15 9:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from reichelt at gcc dot gnu dot org 2006-05-15 09:00 -------
Fixed on mainline.
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27496
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/27496] ICE on broken templated friend
2006-05-08 15:37 [Bug c++/27496] New: ICE on broken templated friend reichelt at gcc dot gnu dot org
` (4 preceding siblings ...)
2006-05-15 9:01 ` reichelt at gcc dot gnu dot org
@ 2006-05-15 19:37 ` patchapp at dberlin dot org
5 siblings, 0 replies; 7+ messages in thread
From: patchapp at dberlin dot org @ 2006-05-15 19:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from patchapp at dberlin dot org 2006-05-15 19:37 -------
Subject: Bug number PR c++/27496
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/msg00333.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27496
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-05-15 19:37 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-08 15:37 [Bug c++/27496] New: ICE on broken templated friend reichelt at gcc dot gnu dot org
2006-05-08 15:38 ` [Bug c++/27496] " reichelt at gcc dot gnu dot org
2006-05-08 15:46 ` pinskia at gcc dot gnu dot org
2006-05-09 14:51 ` patchapp at dberlin dot org
2006-05-15 8:53 ` reichelt at gcc dot gnu dot org
2006-05-15 9:01 ` reichelt at gcc dot gnu dot org
2006-05-15 19:37 ` patchapp at dberlin 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).