aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/pr113603.c
blob: 0d4e817fbefa14ab141d6b9985dde3ab304aba9c (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
/* PR tree-optimization/113603 */

int a, e;
signed char b;
int *c;
signed char *d;
short f;
signed char g[3];

int *
foo (void)
{
  for (int i = 0; i < 3; i++)
    g[i] = 2;
  int j[100][100] = { {}, {4} };
  signed char *k = &g[1];
  do
    {
      for (;;)
	{
	  if (c)
	    break;
	  return &a;
	}
      for (f = 0;; f++)
	{
	  for (b = 0; b < 2; b++)
	    *c = j[b][f];
	  if (e)
	    d = k;
	  *k = *d;
	  if (*c)
	    break;
	  if (f)
	    break;
	}
    }
  while (f);
  return 0;
}