public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/27175] New: No code generated for Explicit Template Instantations on gcc 4.0+
@ 2006-04-15 12:41 skalaren_alpinist at abv dot bg
2006-04-15 12:43 ` [Bug c++/27175] " skalaren_alpinist at abv dot bg
2006-04-15 16:33 ` pinskia at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: skalaren_alpinist at abv dot bg @ 2006-04-15 12:41 UTC (permalink / raw)
To: gcc-bugs
When the line that requests explicit template instantation is before the actual
template class method definitions, g++ 4.0 and 4.1 fail to generate the code
for those methods, resulting in linking errors later. But gcc 3.3 and 3.4 both
have no problems (as well as icc and msvc).
Moving the "template class foo<5>;" line after the definitions fixes this. I'm
not sure what the C++ standard says about that...
-- Steps to reproduce --
Grab the attached simple testcase. Issue "make"
-- Actual results --
Linking fails.
-- Expected results --
Should link successfully.
-- Build date and platform --
gcc 4.1.0 (fedora core 5 default)
-- Additional builds and platforms --
- Also occurs on -
gcc 4.0.1 (fedora core 4 defulat) - DOESN't work
- Doesn't occur on -
gcc 3.3.6 (slackware 10.2 default)
gcc 3.4 (fedora core 3 default)
--
Summary: No code generated for Explicit Template Instantations on
gcc 4.0+
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: skalaren_alpinist at abv dot bg
GCC build triplet: i386-pc-gnu
GCC host triplet: i386-pc-gnu
GCC target triplet: i386-pc-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27175
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/27175] No code generated for Explicit Template Instantations on gcc 4.0+
2006-04-15 12:41 [Bug c++/27175] New: No code generated for Explicit Template Instantations on gcc 4.0+ skalaren_alpinist at abv dot bg
@ 2006-04-15 12:43 ` skalaren_alpinist at abv dot bg
2006-04-15 16:33 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: skalaren_alpinist at abv dot bg @ 2006-04-15 12:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from skalaren_alpinist at abv dot bg 2006-04-15 12:42 -------
Created an attachment (id=11275)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11275&action=view)
A testcase that exploits the bug
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27175
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/27175] No code generated for Explicit Template Instantations on gcc 4.0+
2006-04-15 12:41 [Bug c++/27175] New: No code generated for Explicit Template Instantations on gcc 4.0+ skalaren_alpinist at abv dot bg
2006-04-15 12:43 ` [Bug c++/27175] " skalaren_alpinist at abv dot bg
@ 2006-04-15 16:33 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-04-15 16:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-04-15 16:33 -------
GCC is correct. Please read PR 24511 and DR 470 to learn more.
*** This bug has been marked as a duplicate of 24511 ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27175
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-04-15 16:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-15 12:41 [Bug c++/27175] New: No code generated for Explicit Template Instantations on gcc 4.0+ skalaren_alpinist at abv dot bg
2006-04-15 12:43 ` [Bug c++/27175] " skalaren_alpinist at abv dot bg
2006-04-15 16:33 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).