1 // Testcase from P0136 2 // { dg-do compile { target c++11 } } 3 // { dg-options "-fnew-inheriting-ctors -fdump-tree-gimple -O2 -fno-inline" } 4 5 struct W { W(int); }; 6 struct V: W { using W::W; }; 7 struct X : virtual V { using V::V; X() = delete; }; 8 struct Y : X { using X::X; }; 9 struct Z : Y, virtual V { using Y::Y; }; 10 Z z(0); // OK: initialization of Y does not invoke default constructor of X 11 12 // Check that we're passing this and __vtt along to the Y inheriting 13 // constructor, but not the int parameter. 14 // { dg-final { scan-assembler "_ZN1YCI21WEi" } } 15 // { dg-final { scan-tree-dump "Y::Y ._2, _3.;" "gimple" } } 16 17 // And that we aren't expecting the int, either. 18 // { dg-final { scan-tree-dump-not "Y::Y.int\[^\n\]*int" "gimple" } } 19 20 // And that we *are* passing the int along to V::V. 21 // { dg-final { scan-assembler "_ZN1VCI21WEi" } } 22 // { dg-final { scan-tree-dump "V::V .this, _1.;" "gimple" } } 23