summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/local-alloc1.C
blob: 7488f1971c40cc13086da0ae106e840e96846e4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// { dg-do assemble { target fpic } }
// { dg-options "-O0 -fpic" }
// { dg-skip-if "requires unsupported run-time relocation" { spu-*-* } { "*" } { "" } }
// Origin: Jakub Jelinek <jakub@redhat.com>

struct bar {
  bar() {}
  double x[3];
};

static bar y[4];

void foo(int z)
{
  bar w;
  y[z] = w;
}