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