aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/pr52086.c
blob: a12e1ce79280bc9faf2d8baa7ed71686aedd3667 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* PR target/52086 */
/* { dg-do compile } */
/* { dg-options "-O2" } */
/* { dg-additional-options "-fpic" { target fpic } } */

struct S { char a; char b[100]; };
int bar (void);
int baz (int);

void
foo (struct S *x)
{
  if (bar () & 1)
    {
      char c = bar ();
      baz (4);
      x->a += c;
      while (x->a)
	x->b[c] = bar ();
    }
}