summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/vect/pr22543.cc
blob: f5e55f195ef99eea0bbaa8965b4cf43552b7cea8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* { dg-do compile } */

struct A
{
  int i, j;

  A() : i(), j() {}
  ~A() {}

  operator int() { return 0; }
};

struct B
{
  A foo() const { return A(); }
};

struct X { ~X(); };

struct C
{
  C();

  int z[4];
};

C::C()
{
  for (int i=0; i<4; ++i)
    z[i]=0;

  X x;

  for (int i=0; i<4; ++i)
    int j = B().foo();
}

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