aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr103860.c
blob: 15eee558083dfe9b3f781be4592d5419f3f2f99f (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
/* PR rtl-optimization/103860 */
/* { dg-do run } */
/* { dg-options "-O3" } */
/* { dg-additional-options "-fPIC" { target fpic } } */

static int d, *e;
int f;

__attribute__((noinline)) signed char
foo (signed char b, signed char c)
{
  return b + c;
}

int
main ()
{
  signed char l;
  for (l = -1; l; l = foo (l, 1))
    {
      while (d < 0)
	;
      if (d > 0)
	{
	  f = 0;
	  *e = 0;
	}
    }
  d = 0;
  return 0;
}