aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/ipa/pr57347.c
blob: 731b4868ec3833af0f785946af6c3f46b90f2d7e (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
/* { dg-do run } */
/* { dg-options "-O3" } */

struct S1 { int f0; int f1 : 10; int f2 : 13; };
int i;
int *j = &i;

static void
foo (struct S1 s)
{
  int *p;
  int l[88];
  int **pp = &p;
  *pp = &l[1];
  l[0] = 1;
  *j = 1 && s.f2;
}

int
main ()
{
  struct S1 s = { 0, 0, 1 };
  foo (s);
  if (i != 1)
    __builtin_abort ();
  return 0;
}