Description of problem:
Declare struct with two method templates each having the same name and type
signature, but one having "typename" as formal template parameter, and the other
having "int" as formal template parameter. Provide a definition for the
"typename" version. Then, make a call to the method passing an instance of an
int as the actual template parameter. Produces internal compiler error.
Version-Release number of selected component (if applicable):
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.4/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.4 20050721 (Red Hat 3.4.4-2)
How reproducible:
100%
Steps to Reproduce:
1. Run "g++" on the attached (small) source file.
Actual results:
f.cpp: In function `int main()':
f.cpp:11: internal compiler error: in tsubst, at cp/pt.c:6790
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccArcORi.out file, please attach this to
your bugreport.
Expected results:
No output.
Additional info:

Fedora Core 3 is only supported by Fedora Legacy project and it would have to
be a security issue to be fixed there.
The above doesn't ICE with current FC5 or FC6 gcc:
gcc-c++-4.1.1-1.fc5
/tmp/ccI0sypl.o: In function `main':
u.C:(.text+0x1c): undefined reference to `void S::foo<2>()'
collect2: ld returned 1 exit status

Note

You need to
log in
before you can comment on or make changes to this bug.