http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49237
Summary: error with -flto: 'f' causes a section type conflict Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto AssignedTo: unassig...@gcc.gnu.org ReportedBy: wouter.vermae...@scarlet.be > cat bug.cc struct Bar; struct Base1 { virtual ~Base1(); }; template<typename T> struct Base2 { virtual void f(T&) = 0; }; template<typename> struct Foo : Base1, Base2<Bar> { virtual void f(Bar&) {} }; template struct Foo<Bar>; > g++-snapshot --version g++-snapshot (GCC) 4.7.0 20110530 (experimental) > g++-snapshot bug.cc -c -flto > g++-snapshot bug.o -flto In file included from bug.cc:8:0, from :14: bug.cc: In member function âfâ: bug.cc:9:15: error: f causes a section type conflict Without the '-flto' option it works as expected. This is on linux x86_64 (though I don't think this matters).