diff options
Diffstat (limited to 'test/SemaCXX/class-layout.cpp')
-rw-r--r-- | test/SemaCXX/class-layout.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/SemaCXX/class-layout.cpp b/test/SemaCXX/class-layout.cpp index 56f41bfbdb..b5971723a7 100644 --- a/test/SemaCXX/class-layout.cpp +++ b/test/SemaCXX/class-layout.cpp @@ -47,3 +47,20 @@ struct G { G(); }; struct H : G { }; SA(6, sizeof(H) == 1); + +// PR5580 +namespace PR5580 { + +class A { bool iv0 : 1; }; +SA(7, sizeof(A) == 1); + +class B : A { bool iv0 : 1; }; +SA(8, sizeof(B) == 2); + +struct C { bool iv0 : 1; }; +SA(9, sizeof(C) == 1); + +struct D : C { bool iv0 : 1; }; +SA(10, sizeof(D) == 2); + +} |