[Bug c++/14550] New: [3.4/3.5 regression] trouble with pointers in templates

reichelt at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Mar 12 13:04:00 GMT 2004


The 3.4 branch ICEs on this valid code snippet:

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

template<int> void foo()
{
    A *p=new A;
}

void bar()
{
    foo<0>();
}
=======================================

bug.cc: In function `void foo() [with int <anonymous> = 0]':
bug.cc:13:   instantiated from here
bug.cc:8: internal compiler error: in find_function_data, at function.c:315
Please submit a full bug report, [etc.]

And mainline rejects it:

bug.cc: In function `void foo() [with int <anonymous> = 0]':
bug.cc:13:   instantiated from here
bug.cc:8: error: invalid use of 'A::A' to form a pointer-to-member-function. 
Use a qualified-id.

Mark, I think this is a showstopper for 3.4.0.
If you agree, could you please adjust the target milestone?

-- 
           Summary: [3.4/3.5 regression] trouble with pointers in templates
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, rejects-valid
          Severity: critical
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org,mark at codesourcery dot
                    com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14550



More information about the Gcc-bugs mailing list