public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/3825: Problems in instanciation of generic members.
@ 2001-08-13 6:12 gdr
0 siblings, 0 replies; 2+ messages in thread
From: gdr @ 2001-08-13 6:12 UTC (permalink / raw)
To: fasbjx, gcc-bugs, gcc-prs, gdr, nobody
Synopsis: Problems in instanciation of generic members.
Responsible-Changed-From-To: unassigned->gdr
Responsible-Changed-By: gdr
Responsible-Changed-When: Mon Aug 13 06:12:01 2001
Responsible-Changed-Why:
Boo!
State-Changed-From-To: open->analyzed
State-Changed-By: gdr
State-Changed-When: Mon Aug 13 06:12:01 2001
State-Changed-Why:
Confirmed as bug.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3825&database=gcc
^ permalink raw reply [flat|nested] 2+ messages in thread
* c++/3825: Problems in instanciation of generic members.
@ 2001-07-25 15:36 fasbjx, Branjonneau
0 siblings, 0 replies; 2+ messages in thread
From: fasbjx, Branjonneau @ 2001-07-25 15:36 UTC (permalink / raw)
To: gcc-gnats, debian-gcc
>Number: 3825
>Category: c++
>Synopsis: Problems in instanciation of generic members.
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jul 25 15:36:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Franck Branjonneau
>Release: 3.0 (Debian) (Debian testing/unstable)
>Organization:
>Environment:
System: Linux alpha.tchume.net 2.4.4 #2 mar mai 22 08:16:07 CEST 2001 i586 unknown
Architecture: i586
host: i386-pc-linux-gnu
build: i386-pc-linux-gnu
target: i386-pc-linux-gnu
configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,objc --prefix=/usr --infodir=/share/info --mandir=/share/man --enable-shared --with-gnu-as --with-gnu-ld --with-system-zlib --enable-long-long --enable-nls --without-x --without-included-gettext --disable-checking --enable-threads=posix --enable-java-gc=boehm --with-cpp-install-dir=bin --enable-objc-gc i386-linux
>Description:
The following code:
template< typename X, typename Y, int = 1 >
struct C1 {
template< int, int >
struct C2 {
enum { v = false };
};
};
enum X { a, b, c, d };
template<>
struct C1< X, X >::C2< a, a > {
enum { v = true };
};
template< int a >
struct C1< X, X >::C2< a, a > {
enum { v = true };
};
template< typename X >
struct D: public C1< X, X, 5 > {
template< int a >
struct C1< X, X, 5 >::C2< a, a > {
enum { v = true };
};
};
//template C1< X, X >;
//template D< X >;
#include <iostream>
int main() {
std::cout << D< X >::C2< a, a >::v << std::endl;
}
gives(from www.codesourcery.com)
GCC Output
These are the results of processing your source code with the following command:
g++ [input]
Exit code: 256
Messages:
/usr/tmp/@4352.7.cc: In instantiation of `C1::C2<0, 0>':
/usr/tmp/@4352.7.cc:36: instantiated from here
/usr/tmp/@4352.7.cc:36: Internal compiler error in tsubst, at cp/pt.c:6376
In my environment, messages are slightly different:
g++-3.0 tmp0.cc
tmp0.cc: In instantiation of `C1<X, X, 5>::C2<0, 0>':
tmp0.cc:36: instantiated from here
tmp0.cc:5: Internal compiler error in retrieve_specialization, at cp/pt.c:740
>How-To-Repeat:
>Fix:
Instanciate explicitely the template ie uncomment:
//template D< X >;
Well, it's compile but I've not verify the resulting code.
>Release-Note:
>Audit-Trail:
>Unformatted:
serious
medium
rejects-legal
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-08-13 6:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-13 6:12 c++/3825: Problems in instanciation of generic members gdr
-- strict thread matches above, loose matches on Subject: below --
2001-07-25 15:36 fasbjx, Branjonneau
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).