public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/40056] New: implicit instantiation of function templates fails with -O2, works with -O and -g...
@ 2009-05-07 9:59 Fons dot Rademakers at cern dot ch
2009-05-07 10:02 ` [Bug c++/40056] " Fons dot Rademakers at cern dot ch
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Fons dot Rademakers at cern dot ch @ 2009-05-07 9:59 UTC (permalink / raw)
To: gcc-bugs
The attached file TStreamerInfoReadBuffer.cxx fails to instantiate template
functions when compiled with -O2. With -O or -g things work as expected. This
is a regression that does not appear in <4.4.0.
Compile the attached file with:
g++ -O2 -m64 -c TStreamerInfoReadBuffer.cxx -o TStreamerInfoReadBuffer.o
do:
nm TStreamerInfoReadBuffer.o | grep
__ZN13TStreamerInfo10ReadBufferIPPcEEiR7TBufferRKT_iiii
and no symbol will be found.
Compile with -O:
g++ -O -m64 -c TStreamerInfoReadBuffer.cxx -o TStreamerInfoReadBuffer.o
And:
nm TStreamerInfoReadBuffer.o | grep
__ZN13TStreamerInfo10ReadBufferIPPcEEiR7TBufferRKT_iiii
00000000000603f2 S __ZN13TStreamerInfo10ReadBufferIPPcEEiR7TBufferRKT_iiii
000000000006ba70 S __ZN13TStreamerInfo10ReadBufferIPPcEEiR7TBufferRKT_iiii.eh
--
Summary: implicit instantiation of function templates fails with
-O2, works with -O and -g...
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: blocker
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Fons dot Rademakers at cern dot ch
GCC build triplet: i686-apple-darwin9
GCC host triplet: i686-apple-darwin9
GCC target triplet: i686-apple-darwin9
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40056
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/40056] implicit instantiation of function templates fails with -O2, works with -O and -g...
2009-05-07 9:59 [Bug c++/40056] New: implicit instantiation of function templates fails with -O2, works with -O and -g Fons dot Rademakers at cern dot ch
@ 2009-05-07 10:02 ` Fons dot Rademakers at cern dot ch
2009-05-07 12:24 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Fons dot Rademakers at cern dot ch @ 2009-05-07 10:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from Fons dot Rademakers at cern dot ch 2009-05-07 10:01 -------
Created an attachment (id=17817)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17817&action=view)
Source file (-E output) demonstrating the reported issue.
Btw, this bug shows up on MacOS X 10.5.6, Linux RHEL 5 and Ubuntu 9, i.e. it is
platform independent.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40056
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/40056] implicit instantiation of function templates fails with -O2, works with -O and -g...
2009-05-07 9:59 [Bug c++/40056] New: implicit instantiation of function templates fails with -O2, works with -O and -g Fons dot Rademakers at cern dot ch
2009-05-07 10:02 ` [Bug c++/40056] " Fons dot Rademakers at cern dot ch
@ 2009-05-07 12:24 ` pinskia at gcc dot gnu dot org
2009-05-07 12:25 ` pinskia at gcc dot gnu dot org
2009-05-07 13:55 ` Fons dot Rademakers at cern dot ch
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-05-07 12:24 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Severity|blocker |normal
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40056
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/40056] implicit instantiation of function templates fails with -O2, works with -O and -g...
2009-05-07 9:59 [Bug c++/40056] New: implicit instantiation of function templates fails with -O2, works with -O and -g Fons dot Rademakers at cern dot ch
2009-05-07 10:02 ` [Bug c++/40056] " Fons dot Rademakers at cern dot ch
2009-05-07 12:24 ` pinskia at gcc dot gnu dot org
@ 2009-05-07 12:25 ` pinskia at gcc dot gnu dot org
2009-05-07 13:55 ` Fons dot Rademakers at cern dot ch
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-05-07 12:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2009-05-07 12:25 -------
The implicit instantiation of function templates could be inlined at which
point, it does not need to be emitted.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40056
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/40056] implicit instantiation of function templates fails with -O2, works with -O and -g...
2009-05-07 9:59 [Bug c++/40056] New: implicit instantiation of function templates fails with -O2, works with -O and -g Fons dot Rademakers at cern dot ch
` (2 preceding siblings ...)
2009-05-07 12:25 ` pinskia at gcc dot gnu dot org
@ 2009-05-07 13:55 ` Fons dot Rademakers at cern dot ch
3 siblings, 0 replies; 5+ messages in thread
From: Fons dot Rademakers at cern dot ch @ 2009-05-07 13:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from Fons dot Rademakers at cern dot ch 2009-05-07 13:55 -------
Explicit template instantiation also works for us in this case. However, would
be nice to see this regression fixed. No blocker anymore.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40056
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-05-07 13:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-07 9:59 [Bug c++/40056] New: implicit instantiation of function templates fails with -O2, works with -O and -g Fons dot Rademakers at cern dot ch
2009-05-07 10:02 ` [Bug c++/40056] " Fons dot Rademakers at cern dot ch
2009-05-07 12:24 ` pinskia at gcc dot gnu dot org
2009-05-07 12:25 ` pinskia at gcc dot gnu dot org
2009-05-07 13:55 ` Fons dot Rademakers at cern dot ch
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).