Bug 16318 - [4.0 regression] ICE with pointer-to-member-functions
Summary: [4.0 regression] ICE with pointer-to-member-functions
Status: RESOLVED DUPLICATE of bug 16383
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.0.0
: P2 critical
Target Milestone: 4.0.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code, monitored
Depends on:
Blocks:
 
Reported: 2004-07-01 16:38 UTC by Volker Reichelt
Modified: 2004-09-13 14:15 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2004-07-02 21:28:25


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Reichelt 2004-07-01 16:38:16 UTC
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.]
Comment 1 Andrew Pinski 2004-07-02 21:28:25 UTC
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.
Comment 2 Volker Reichelt 2004-07-12 12:11:34 UTC

*** This bug has been marked as a duplicate of 16383 ***