http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50226
Bug #: 50226 Summary: Wrong code with -O -fno-implicit-templates Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: d.g.gorbac...@gmail.com Target: i686-pc-linux-gnu Created attachment 25127 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25127 testcase Compile with `g++-4.7.0 -O -fno-implicit-templates 1.cc 2.cc'. GOLD gives warnings: function main: warning: relocation refers to discarded section function vtable for Beth<int>: warning: relocation refers to discarded section BFD LD remains silent. Appeared between rev. 174012 and 176963.