[Bug lto/49237] New: error with -flto: 'f' causes a section type conflict
wouter.vermaelen at scarlet dot be
gcc-bugzilla@gcc.gnu.org
Mon May 30 20:27:00 GMT 2011
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: unassigned@gcc.gnu.org
ReportedBy: wouter.vermaelen@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).
More information about the Gcc-bugs
mailing list