Bug 511168 - Explicit template invocation must invoke template function
Explicit template invocation must invoke template function
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-07-13 20:13 EDT by Thomas Sondergaard
Modified: 2010-04-27 12:25 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-04-27 12:25:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
GNU Compiler Collection 40740 None None None Never

  None (edit)
Description Thomas Sondergaard 2009-07-13 20:13:50 EDT
This nonsense demonstrates the problem:

#include <iostream>
#include <cassert>

template<class T>
T addsome(T v) {
  return v+1;

int addsome(int v) {
  return v+2;

int main() {
  int i = 0;
  assert(addsome(i) == 2);
  assert(addsome<>(i) == 1);
  return 0;

The example works fine with earlier versions of gcc, e.g. gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44)
Comment 1 Jakub Jelinek 2009-07-14 03:43:20 EDT
This started failing with http://gcc.gnu.org/PR13549 change.  CCing Jason whether this is valid or not.
Comment 2 Jason Merrill 2009-07-14 04:04:12 EDT
Yes, this is a bug.
Comment 3 Jason Merrill 2009-07-14 14:46:48 EDT
This will be fixed in GCC 4.4.1.
Comment 4 Bug Zapper 2010-04-27 11:39:34 EDT
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
Comment 5 Thomas Sondergaard 2010-04-27 12:25:42 EDT
This bug has been fixed upstream and works with current fc11 gcc 4.4.1-2

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