Bug 29219 - Template instantiation problem - Different behavior between gcc 4.0.x and gcc 3.4.x.
Summary: Template instantiation problem - Different behavior between gcc 4.0.x and gcc...
Status: RESOLVED DUPLICATE of bug 20547
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.0.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-25 20:15 UTC by Etienne Clement
Modified: 2006-09-25 21:11 UTC (History)
2 users (show)

See Also:
Host: i686-apple-darwin8
Target: i686-apple-darwin8
Build: powerpc-apple-darwin8
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Program causing the problem. (637 bytes, text/plain)
2006-09-25 20:19 UTC, Etienne Clement
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Etienne Clement 2006-09-25 20:15:28 UTC
If you compile the attached code using g++ 4.0.x using the following command:

> g++ -v -save-temps -O3 -c bug.cpp

and look at the list of symbols in the bug.o file using the following command:

> nm bug.o

You will see that g++ generates a symbol for 'PxlMonoLimit<(PxlFormat)0>::limit'. IMHO, there is no reason to generate such a symbol. g++ 3.4.x do not generate one.

Thank you,
Etienne Clement
Comment 1 Etienne Clement 2006-09-25 20:19:42 UTC
Created attachment 12325 [details]
Program causing the problem.

1- Compile using the following command:

> g++ -v -save-temps -O3 -c bug.cpp

Use the following command to see that a symbol is generated for 'PxlMonoLimit<(PxlFormat)0>::limit'.

> nm bug.o

2- Compile using the following command:

> g++ -v -save-temps -O3 -DWORK -c bug.cpp

Use the following command to see that no symbol for 'PxlMonoLimit<(PxlFormat)0>::limit' is generated.

> nm bug.o
Comment 2 Andrew Pinski 2006-09-25 21:11:18 UTC
This is not a bug.

THis is a dup of bug 20547.

*** This bug has been marked as a duplicate of 20547 ***