The following invalid code snippet triggers an ICE on trunk:

=======================================
struct A {};

struct B
{
  void foo() const;
  void foo();
};

template<void (A::*)()> void bar();

void baz()
{
  bar<&B::foo>();
}
=======================================

bug.cc: In function 'void baz()':
bug.cc:13:16: internal compiler error: in convert_nontype_argument, at
cp/pt.c:5132
Please submit a full bug report, [etc.]


-- 
           Summary: [4.5 Regression] ICE with incompatible pointer-to-
                    member-function as template parameter
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, monitored
          Severity: normal
          Priority: P3
         Component: c++
        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=43079

Reply via email to