Bug 207873 - internal compiler error in template specialization
Summary: internal compiler error in template specialization
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc34
Version: 3
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2006-09-25 01:06 UTC by Matthew Carter
Modified: 2007-11-30 22:11 UTC (History)
0 users

Clone Of:
Last Closed: 2006-09-25 06:29:29 UTC

Attachments (Terms of Use)
C pre-processor output that reproduces the internal compiler error (369 bytes, text/plain)
2006-09-25 01:06 UTC, Matthew Carter
no flags Details

Description Matthew Carter 2006-09-25 01:06:20 UTC
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:


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:

Comment 1 Matthew Carter 2006-09-25 01:06:20 UTC
Created attachment 137024 [details]
C pre-processor output that reproduces the internal compiler error

Comment 2 Jakub Jelinek 2006-09-25 06:29:29 UTC
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:
/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.