Bug 409251 - g++ template handling bug
g++ template handling bug
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
i686 Linux
low Severity high
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-12-03 15:12 EST by Przemyslaw Sowa
Modified: 2007-12-06 08:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-12-06 08:07:56 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
The source code to reproduce the bug. (325 bytes, text/plain)
2007-12-03 15:12 EST, Przemyslaw Sowa
no flags Details

  None (edit)
Description Przemyslaw Sowa 2007-12-03 15:12:30 EST
Description of problem:

Version-Release number of selected component (if applicable):

How reproducible:
Try to compile the attached file.

Steps to Reproduce:
1. g++ -o bug g++_bug.cpp
Actual results:
g++_bug.cpp: In constructor ‘Template<T>::Template() [with T = int]’:
g++_bug.cpp:5:   instantiated from ‘int Template<int>::member’
g++_bug.cpp:5:   instantiated from ‘Template<T>::Template() [with T = int]’
g++_bug.cpp:18:   instantiated from here
g++_bug.cpp:5: internal compiler error: in instantiate_decl, at cp/pt.c:11947

Expected results:
Compiled code.

Additional info:
g++ (GCC) 4.1.2 20070925 (Red Hat 4.1.2-33)
Comment 1 Przemyslaw Sowa 2007-12-03 15:12:30 EST
Created attachment 276091 [details]
The source code to reproduce the bug.
Comment 2 Jakub Jelinek 2007-12-06 08:07:56 EST
This is invalid code, and g++ 4.3 emits proper diagnostics.
rh409251.C:14: error: template arguments to ‘Template<int>::member’ do not match 
original template ‘Template<T>::member’
rh409251.C:14: note: use template<> for an explicit specialization

For 4.1/4.2 this is too low priority bug, so marking as fixed with NEXTRELEASE,
as F9 is going to use F9 soon.

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