aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/pr92090.c
blob: 9af74946afb3ce2a56842ed79d9707c40dc47184 (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
35
36
37
38
39
40
41
42
43
/* { dg-do compile } */
/* { dg-options "-mcpu=power8 -Os" } */
/* { dg-additional-options "-mbig" { target powerpc64le-*-* } } */

/* Verify that we don't ICE.  */

_Atomic int a;
_Atomic long double b, c;
int j;
void foo (void);
void bar (int, int, int, int);

void
bug (void)
{
  b = 1;
  int d, e, f, g;
  while (a)
    ;
  for (int h = 0; h < 10000; h++)
    {
      double i = b /= 3;
      foo ();
      if (i)
	{
	  if (i == 1)
	    d++;
	  e++;
	  b = 0;
	}
      else
	{
	  if (i == 2)
	    f++;
	  g++;
	  b = 1;
	}
    }
  bar (d, e, f, g);
  c = 1;
  for (int h; h; h++)
    j = 0;
}