diff options
Diffstat (limited to 'test/Analysis/derived-to-base.cpp')
-rw-r--r-- | test/Analysis/derived-to-base.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Analysis/derived-to-base.cpp b/test/Analysis/derived-to-base.cpp index f65b9db17b..f6c9beb465 100644 --- a/test/Analysis/derived-to-base.cpp +++ b/test/Analysis/derived-to-base.cpp @@ -13,3 +13,12 @@ public: void B::f() { x = 3; } + + +class C : public B { +public: + void g() { + // This used to crash because we are upcasting through two bases. + x = 5; + } +}; |