This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51565] [4.4/4.5/4.6/4.7 Regression] fastcall in array of method pointers: internal compiler error
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 11 Jan 2012 20:51:01 +0000
- Subject: [Bug c++/51565] [4.4/4.5/4.6/4.7 Regression] fastcall in array of method pointers: internal compiler error
- Auto-submitted: auto-generated
- References: <bug-51565-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51565
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |jason at gcc dot gnu.org
AssignedTo|unassigned at gcc dot |jason at gcc dot gnu.org
|gnu.org |
--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> 2012-01-11 20:51:01 UTC ---
4.3 generated wrong code for this testcase, which you can see by extending it a
bit:
extern "C" void abort();
int i;
struct Foo {
__attribute__((fastcall))
void fee(int j) { i = j; }
};
int main()
{
typedef void (Foo::*FP)(int);
FP fp[] = {&Foo::fee};
(Foo().*(fp[0]))(42);
if (i != 42)
abort();
}
This is true back to version 3.4. Before that, we just ignored the attribute.