Richard, here's some fall-out from your tree-sra rewrite http://gcc.gnu.org/ml/gcc-cvs/2004-06/msg01253.html The following code snippet crashes mainline when compiled with optimization: ============================================ struct A { void (A::*p)(); void foo() const { (A().*p)(); } }; inline A makeA() { return A(); } void bar() { makeA().foo(); } ============================================ The error message is: bug.cc: In function `void bar()': bug.cc:10: internal compiler error: in generate_element_copy, at tree-sra.c:1461 Please submit a full bug report, [etc.]
Confirmed, this is the normal C++ being funny with field pointer-to-member-functions. The fix for this will most likely fix IMA with structs too.
*** This bug has been marked as a duplicate of 16383 ***