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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2020-02-08
                 CC|                            |jakub at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
It ICEs even without the consteval virtual:
struct A {
  virtual int foo () { return 1; }
};

struct B : A {
  virtual int foo () { return 0; }
};

consteval int
foo ()
{
  A *a = new B ();
  return a->foo ();
}

int
main ()
{
  return foo ();
}

At that point, I think we need to diagnose call to non-constexpr method, with
constexpr virtual ... it ICEs too.  I'll look at it.

Reply via email to