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; 14+ 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] 14+ messages in thread
[parent not found: <bug-40056-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2012-03-08 23:27 UTC | newest]

Thread overview: 14+ 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
     [not found] <bug-40056-4@http.gcc.gnu.org/bugzilla/>
2011-09-28 22:05 ` paolo.carlini at oracle dot com
2012-03-08 14:29 ` bircoph at gmail dot com
2012-03-08 14:44 ` redi at gcc dot gnu.org
2012-03-08 15:12 ` bircoph at gmail dot com
2012-03-08 15:49 ` redi at gcc dot gnu.org
2012-03-08 20:45 ` bircoph at gmail dot com
2012-03-08 21:06 ` redi at gcc dot gnu.org
2012-03-08 21:17 ` Fons.Rademakers at cern dot ch
2012-03-08 23:27 ` bircoph at gmail dot com

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).