Bug 57466

Summary: gcc 2.96-97 produces error #373
Product: [Retired] Red Hat Linux Reporter: Peter Klotz <peter.klotz>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED CURRENTRELEASE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-12-15 18:47:11 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:

Description Peter Klotz 2001-12-13 11:48:11 UTC
Description of Problem:
An internal error #373 occurs when trying to compile the program given
under Additional Information. When you remove the namespace spc it works
fine.

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

How Reproducible:
always

Steps to Reproduce:
1. g++ prog.cpp -o prog
2. ./prog
3. 

Actual Results:


Expected Results:
Should compile

Additional Information:
#include <list>
#include <string>
#include <algorithm>

namespace spc {

template<typename T>
T f(T i)
{
	return i;
}

} // namespace

class A
{
public:
	template<typename T>
	void g(std::list<T>& l);	
};

template<typename T>
void A::g(std::list<T>& l)
{	
	std::transform(l.begin(),l.end(),l.begin(),spc::f<int>);
}

int main(void)
{
	std::list<int> l;
	
	A a;
	a.g(l);
	return 0;
}

Comment 1 Alan Cox 2002-12-15 18:47:11 UTC
Compiles in 8.0