This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/6236: ia64 vtable call - Illegal Instruction
- From: wilson at gcc dot gnu dot org
- To: W dot Stuehlmeyer at t-online dot de, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, wilson at gcc dot gnu dot org
- Date: 18 Apr 2002 22:03:56 -0000
- Subject: Re: c++/6236: ia64 vtable call - Illegal Instruction
- Reply-to: wilson at gcc dot gnu dot org, W dot Stuehlmeyer at t-online dot de, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, wilson at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Synopsis: ia64 vtable call - Illegal Instruction
Responsible-Changed-From-To: unassigned->wilson
Responsible-Changed-By: wilson
Responsible-Changed-When: Thu Apr 18 15:03:53 2002
Responsible-Changed-Why:
IA-64 maintainer
State-Changed-From-To: open->closed
State-Changed-By: wilson
State-Changed-When: Thu Apr 18 15:03:53 2002
State-Changed-Why:
The program fails because it makes incorrect assumptions about
the vtable format.
Gcc now uses the new multi-vendor C++ ABI. See
http://www.codesourcery.com/cxx-abi/
On IA-64, the vtable format does not include function pointers,
i.e. an address of a function description. Instead, the vtable
includes the actual function descriptor itself. Thus if you
pretend the vtable is an array of function addresses, then you
will get one more dereference than you want, and the program
will fail. Your code will need to be updated to handle the new
vtable format correctly.
See http://www.codesourcery.com/cxx-abi/abi.html#vtable.
The section on function pointers is out of date, the decision
was made to use the address/gp pair in the vtable. You can
see that if you look through the closed issues list. The link
for this is on the first page mentioned above.
I don't know if this is documented anywhere in the Intel
documentation, but this is the same way that the Intel
compiler implements vtables, so this isn't a GNU specific
issue.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6236