summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/931017-1.c
blob: 5917bd95b76daf388039ec17cff89f423435845c (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
44
45
46
47
48
49
50
51
52
53
54
int v;

main ()
{
  f ();
  exit (0);
}

h1 ()
{
  return 0;
}

h2 (e)
     int *e;
{
  if (e != &v)
    abort ();
  return 0;
}

g (c)
     char *c;
{
  int i;
  int b;

  do
    {
      i = h1 ();
      if (i == -1)
	return 0;
      else if (i == 1)
	h1 ();
    }
  while (i == 1);

  do
    b = h2 (&v);
  while (i == 5);

  if (i != 2)
    return b;
  *c = 'a';

  return 0;
}


f ()
{
  char c;
  g (&c);
}