summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/vect/pr21218.cc
blob: 73331d22702ed2ae4d0b27810fbb63edf6017d01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-do compile } */

struct A
{
    double d[2];
    double foo(int i) { return d[i]; }
};

struct B : public A {};

void bar(B& b)
{
    for (int i=0; i<2; ++i)
        b.d[i] = b.foo(i);
}

/* { dg-final { cleanup-tree-dump "vect" } } */