Bug 21339 - [3.4 regression] ICE with pointer to member in template
Summary: [3.4 regression] ICE with pointer to member in template
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.4.4
: P2 critical
Target Milestone: 3.4.4
Assignee: Mark Mitchell
URL:
Keywords: ice-on-valid-code, monitored
: 21337 (view as bug list)
Depends on:
Blocks: 21337
  Show dependency treegraph
 
Reported: 2005-05-02 14:13 UTC by Volker Reichelt
Modified: 2005-05-02 18:44 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work: 3.4.3 4.1.0 4.0.0
Known to fail:
Last reconfirmed: 2005-05-02 14:19:10


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Reichelt 2005-05-02 14:13:28 UTC
The testcase in PR 15875 started ICE'ing on the 3.4 branch again:

==================================
struct A
{
    void foo();
};

template<int> void bar()
{
    typedef void (A::*fptr)();
    fptr ptr = &A::foo;
}
==================================

bug.c: In function `void bar()':
bug.c:9: internal compiler error: in build_ptrmemfunc, at cp/typeck.c:5548
Please submit a full bug report, [etc.]

Mark, this is most probably due to the fix for PR18464.
Could you please have a look?

The testcase doesn't seem to be in the testsuite.
It should probably be added.
Comment 1 Andrew Pinski 2005-05-02 14:18:29 UTC
*** Bug 21337 has been marked as a duplicate of this bug. ***
Comment 2 Andrew Pinski 2005-05-02 14:19:10 UTC
Confirmed.
Comment 3 Mark Mitchell 2005-05-02 14:56:22 UTC
Subject: Re:  New: [3.4 regression] ICE with pointer to member
 in template

reichelt at gcc dot gnu dot org wrote:
> The testcase in PR 15875 started ICE'ing on the 3.4 branch again:

> Mark, this is most probably due to the fix for PR18464.

It is indeed.

> Could you please have a look?

In progress.

> The testcase doesn't seem to be in the testsuite.
> It should probably be added.

Yes, I'll add it in the process of figuring out what to do here.

Comment 4 Mark Mitchell 2005-05-02 18:44:07 UTC
Fixed in 3.4.4.  See PR 15875 for the patch.