PR c++/88110 * constexpr.c (cxx_eval_constant_expression) <case OBJ_TYPE_REF>: Punt if get_base_address of ADDR_EXPR operand is not a DECL_P. * g++.dg/cpp2a/constexpr-virtual13.C: New test. From-SVN: r266329
21 lines
297 B
C
21 lines
297 B
C
// PR c++/88110
|
|
// { dg-do compile }
|
|
|
|
struct A {
|
|
virtual int foo () const = 0;
|
|
};
|
|
struct B {
|
|
virtual int bar () const = 0;
|
|
virtual int baz () const = 0;
|
|
};
|
|
struct C : public A { };
|
|
struct D : public C { };
|
|
struct E : public D, public B { };
|
|
|
|
void
|
|
qux (const E *x)
|
|
{
|
|
if (x->baz ())
|
|
;
|
|
}
|