[Bug c++/51565] [4.4/4.5/4.6/4.7 Regression] fastcall in array of method pointers: internal compiler error
jason at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jan 11 20:51:00 GMT 2012
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.
More information about the Gcc-bugs
mailing list