Bug 207873

Summary: internal compiler error in template specialization
Product: [Fedora] Fedora Reporter: Matthew Carter <r_q_einstein-redhat>
Component: gcc34Assignee: Jakub Jelinek <jakub>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: 4.1.1-1.fc5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-09-25 06:29:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
C pre-processor output that reproduces the internal compiler error none

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:

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:

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:
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