This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/34468] New: member-function pointers + regarm(3) == incorrect code
- From: "bruce_pedersen at altera dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Dec 2007 20:21:19 -0000
- Subject: [Bug c++/34468] New: member-function pointers + regarm(3) == incorrect code
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Calling through a member function pointer that points to a member function that
has been declared with __attribute((regparm(3))) silently generates incorrect
code. This is true even if the member function pointer has been declared with
the regparm(3) attribute:
int ((__attribute((regparm(3))) FOO::*mfptr )(int));
STL has "functor" classes built upon member functions, which is where this
first popped up for me.
GCC4.2.1 on Linux-x86
--
Summary: member-function pointers + regarm(3) == incorrect code
Product: gcc
Version: 4.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bruce_pedersen at altera dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34468