summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/compat/init/byval1_y.C
blob: 6e217e84ec5b356a35936e07770597d469562ca5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "byval1.h"

void *p[2];

int i;
int r;

C::C()  { p[i++] = this; }
C::~C() { if (p[--i] != this) r = 1; }

void Foo (C c)
{
  p[i++] = &c;
}