Problems with new vtable layout on Itanium with gcc 3.1
Denkhaus, Volker
Volker.Denkhaus@softwareag.com
Mon Jun 10 04:26:00 GMT 2002
Hi,
we have a serious problem with the new vtable layout of the new gcc 3.1 on
the Itanium platform. We need to create vtables during compile time. The
problems seems to be that we do not only have a 8 byte pointer to the
function, but an additional 8 byte global pointer.
We have tried to solve this in the attached program. The program attached is
the preprocessor output and can be compiled without any other file needed.
In the assembler output one can see that only the 8 byte function pointer is
calculated, but the second pointer seems to be needed too.
In detail:
We have defined a structure IMallocVtbl in line 59001. A second strcuture
CMalloc (line 59019) contains only a pointer to IMallocVtbl. Then we define
a global variable g_pMalloc (line 59033). Later we try to call one of the
member functions (Alloc in this case, which is the 3rd member function) on
line 59292 (g_pMalloc->Alloc(..)); but we end up in the GetSize member
function (which is the 6th member function).
Is this a problem of the calling convention or a problem of the define of
the structure? Or is that a compiler bug?
Any help is highly appreciated.
Regards,
Volker Denkhaus
<<mem.zip>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20020610/f847dfd2/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mem.zip
Type: application/octet-stream
Size: 189070 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20020610/f847dfd2/attachment.obj>
More information about the Gcc-bugs
mailing list