aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/init16.C
blob: 83d5a4eb5c5399d44b4fe804aa043e41e67919b6 (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
// Origin: Jakub Jelinek <jakub@redhat.com>

struct bar {
  char c;
  bar (const char *);
  bar (const bar &);
};

struct foo {
  bar x;
};

extern const struct foo y = { "foo" };

bar::bar (const bar &ref)
{
  c = ref.c;
}

bar::bar (const char *p)
{
  c = p[2];
}

int main ()
{
  return y.x.c != 'o';
}