diff options
Diffstat (limited to 'test/CodeGenCXX/constructors.cpp')
-rw-r--r-- | test/CodeGenCXX/constructors.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/CodeGenCXX/constructors.cpp b/test/CodeGenCXX/constructors.cpp index 2c95c91..a8dc7fc 100644 --- a/test/CodeGenCXX/constructors.cpp +++ b/test/CodeGenCXX/constructors.cpp @@ -12,7 +12,7 @@ struct ValueClass { /* Test basic functionality. */ -class A { +struct A { A(struct Undeclared &); A(ValueClass); Member mem; @@ -92,3 +92,15 @@ D::D(int x, ...) : A(ValueClass(x, x+1)), mem(x*x) {} // CHECK: call void @_ZN10ValueClassC1Eii( // CHECK: call void @_ZN1AC2E10ValueClass( // CHECK: call void @_ZN6MemberC1Ei( + + +// PR6622: this shouldn't crash +namespace test0 { + struct A {}; + struct B : virtual A { int x; }; + struct C : B {}; + + void test(C &in) { + C tmp = in; + } +} |