summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/tree-ssa/pr19952.C
blob: 54589a294cc62727e6c3dc560576405dcd36c37c (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
/* PR 19952 */
/* { dg-do compile } */
/* { dg-options "-ftree-vectorize -O2" } */

int i;

struct A
{
    ~A() { ++i; }
};

struct B
{
    A a;
};

void foo()
{
    for (int i=0; i<2; ++i)
    {
        B *p;
        if (p) p->~B();
    }
}