Compiling the following program: #define STDCALL __attribute__((stdcall)) struct B1 { int x; virtual int STDCALL bar(int x) = 0; }; struct B2 { int x; virtual int STDCALL foo(int x) = 0; }; struct D: B1, B2 { int a; int STDCALL bar(int n); int STDCALL foo(int n); }; int STDCALL D::bar(int n) { return a + n; } int STDCALL D::foo(int n) { return a + n; } with "gcc -x c++ gccbug5.c" on MinGW results in the following error message: gccbug5.c:26: error: 'int *LTHUNK0(int)' aliased to undefined symbol '_ZN1D3fooEi'
LTHUNK0 should be aliased to "_ZN1D3fooEi@4". The bug goes away if D::bar(int) is not defined.
This looks related to Bug 27067.
Does the patch there fix this issue also?
(In reply to comment #2) > This looks related to Bug 27067. Not only related but pretty much the same thing. And Ross' example program compiles cleanly using the latest 4.1.1 (20060512) snapshot with Danny's patch for 27067 applied. I don't have the 4.2.0 available but I imagine the same patch can be used to mend it as well.
*** This bug has been marked as a duplicate of 27067 ***