aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.7/gcc/testsuite/gcc.dg/torture/pr52530.c
blob: d32ea828cb5fb299e3f8c684568b8b876e0fd8ba (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
29
30
/* { dg-do run } */

extern void abort (void);

struct foo
{
 int *f;
 int i;
};

int baz;

void __attribute__ ((noinline))
bar (struct foo x)
{
 *(x.f) = x.i;
}

int
main ()
{
  struct foo x = { &baz, 0xdeadbeef };

  bar (x);

  if (baz != 0xdeadbeef)
    abort ();

  return 0;
}