From: Paolo Carlini Date: Tue, 24 Mar 2015 15:58:05 +0000 (+0000) Subject: re PR c++/61971 (array subscript is above array bounds [-Werror=array-bounds]) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0dc47aa30a1e9e13e4fb780b6ecee0b51867f0a4;p=gcc.git re PR c++/61971 (array subscript is above array bounds [-Werror=array-bounds]) 2015-03-24 Paolo Carlini PR c++/61971 * g++.dg/warn/Warray-bounds-7.C: New. From-SVN: r221636 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 48a99cc6abe..4a29edfa231 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-03-24 Paolo Carlini + + PR c++/61971 + * g++.dg/warn/Warray-bounds-7.C: New. + 2015-03-24 Paolo Carlini PR c++/60067 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; +}