summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr70775.c
blob: 290c8607654bcf2d6441bd92d6dfe275f80991af (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
31
32
33
34
/* { dg-do compile } */
/* { dg-options "-O3" } */

struct S
{
  int f1;
  int f2;
} a;

int b, c, d, e;
short f;

int
fn1 (int p1, unsigned p2)
{
  return p1 + p2;
}

void
fn2 ()
{
  struct S g;
  int h;
  for (; c; c++)
    for (f = -3; f < 3; f = fn1 (f, 8))
      {
        a.f1 = e;
        if (b)
          a = g;
        else
          for (; h; h++)
            d = b;
      }
}