The following testcase crashes the compiler when compiled with -fipa-pta:

======================================
struct A
{
    int i, j;
};

A foo(A);

template<int> A bar(A a) { return foo(a); }

void baz()
{
    bar<0>(A());
}
======================================

bug.cc: In function 'void baz(B<0>&)':
bug.cc:12: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]


-- 
           Summary: ICE with -fipa-pta and templates
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, monitored
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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

Reply via email to