OSDN Git Service

cp/ChangeLog
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / vect / pr21734_1.cc
1 /* { dg-do compile } */
2
3 struct A
4 {
5   int a[4];
6   int& operator[](int i) { return a[i]; }
7 };
8
9 struct B : public A
10 {
11   int& operator[](int i) { return A::operator[](i); }
12 };
13
14 void foo(B &b)
15 {
16   for (int i=0; i<4; ++i)
17     b[i] = 0;
18 }
19
20 /* { dg-final { cleanup-tree-dump "vect" } } */