aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8.1/gcc/testsuite/g++.dg/opt/pr25857.C
blob: 4e6858fe1958b24222faa8b561bcb55f4fc44b99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-do compile } */
/* { dg-options "-O2" } */

int foo();
int i;

struct A
{
  ~A() { if (this != (A*)(&i)) foo(); }
};

struct B
{
  A a1, a2, a3, a4;
  ~B() { foo(); }
};

B b;