https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115664

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Testcase:
```

struct Object
{
template<class T>
void method(void (*callback)(T*));
virtual void g();
};

template<class T>
void Object::method(void (*callback)(T*))
{
  if (dynamic_cast<T*>(this) == nullptr)
    throw 1;
}

struct g{};

void c(g*);

void f(Object &a)
{
  a.method(c);
}
```

Reply via email to