mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-21 15:50:50 +08:00
re PR c++/61971 (array subscript is above array bounds [-Werror=array-bounds])
2015-03-24 Paolo Carlini <paolo.carlini@oracle.com> PR c++/61971 * g++.dg/warn/Warray-bounds-7.C: New. From-SVN: r221636
This commit is contained in:
parent
9ccd0dba21
commit
0dc47aa30a
@ -1,3 +1,8 @@
|
||||
2015-03-24 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/61971
|
||||
* g++.dg/warn/Warray-bounds-7.C: New.
|
||||
|
||||
2015-03-24 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/60067
|
||||
|
21
gcc/testsuite/g++.dg/warn/Warray-bounds-7.C
Normal file
21
gcc/testsuite/g++.dg/warn/Warray-bounds-7.C
Normal file
@ -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;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user