diff --git a/clang/lib/AST/Interp/ByteCodeExprGen.cpp b/clang/lib/AST/Interp/ByteCodeExprGen.cpp --- a/clang/lib/AST/Interp/ByteCodeExprGen.cpp +++ b/clang/lib/AST/Interp/ByteCodeExprGen.cpp @@ -107,7 +107,8 @@ }); } - case CK_UncheckedDerivedToBase: { + case CK_UncheckedDerivedToBase: + case CK_DerivedToBase: { if (!this->visit(SubExpr)) return false; diff --git a/clang/test/AST/Interp/records.cpp b/clang/test/AST/Interp/records.cpp --- a/clang/test/AST/Interp/records.cpp +++ b/clang/test/AST/Interp/records.cpp @@ -245,6 +245,8 @@ static_assert(c.a == 10, ""); static_assert(c.b == 20, ""); + constexpr const A *aPointer = &c; + constexpr const B *bPointer = &c; class D : private A, private B { public: