Bug 57466 - gcc 2.96-97 produces error #373
gcc 2.96-97 produces error #373
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-12-13 06:48 EST by Peter Klotz
Modified: 2007-04-18 12:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-12-15 13:47:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Peter Klotz 2001-12-13 06:48:11 EST
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 13:47:11 EST
Compiles in 8.0

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