This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/2235: GCC 2.95.2 I.C.E. on "friend" template declaration
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/2235: GCC 2.95.2 I.C.E. on "friend" template declaration
- From: mhfrantz at bigfoot dot com
- Date: 9 Mar 2001 01:14:13 -0000
- Reply-To: mhfrantz at bigfoot dot com
>Number: 2235
>Category: c++
>Synopsis: GCC 2.95.2 I.C.E. on "friend" template declaration
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-legal-code
>Submitter-Id: net
>Arrival-Date: Thu Mar 08 17:16:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Matt Frantz
>Release: 2.95.2 19991024
>Organization:
>Environment:
Linux 2.2.18 i686 i386-linux-libc6
800MHz P-III, 784Mb
>Description:
I think this is legal code, but I'm no expert.
>How-To-Repeat:
# 1 "bug.cc"
template < typename T, typename U = int >
class C {
template < typename T1, typename U1 >
friend C< T1, U1 >;
};
C< int > a;
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
>g++ bug.cc -c
bug.cc: In instantiation of `C<int,int>':
bug.cc:10: instantiated from here
bug.cc:3: Internal compiler error.
bug.cc:3: Please submit a full bug report.
bug.cc:3: See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions.
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="bug.ii"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="bug.ii"
IyAxICJidWcuY2MiCgp0ZW1wbGF0ZSA8IHR5cGVuYW1lIFQsIHR5cGVuYW1lIFUgPSBpbnQgPgpj
bGFzcyBDIHsKCiAgdGVtcGxhdGUgPCB0eXBlbmFtZSBUMSwgdHlwZW5hbWUgVTEgPgogIGZyaWVu
ZCBDPCBUMSwgVTEgPjsKCn07CgpDPCBpbnQgPiBhOwo=