diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/warn/Warray-bounds-7.C')
-rw-r--r-- | gcc/testsuite/g++.dg/warn/Warray-bounds-7.C | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/warn/Warray-bounds-7.C b/gcc/testsuite/g++.dg/warn/Warray-bounds-7.C new file mode 100644 index 00000000000..7f18a61a47a --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/Warray-bounds-7.C @@ -0,0 +1,21 @@ +// PR c++/61971 +// { dg-options "-O2 -Warray-bounds" } + +class B { +public: + virtual ~B(){}; +}; + +class A { +public: + B m1[1]; + B m2[1]; + B m3[1]; + + A(){}; +}; + +int main() { + A v; + return 0; +} |