summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/pr21173.c
blob: 61459bca7e56c84b0a2b23813e7e70536b00dbf2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
void abort (void);

char q;
void *a[2];

void foo (char *p)
{
  int i;
  for (i = 0; i < 2; i++)
    a[i] += p - &q;
}

int main (void)
{
  int i;
  foo (&q);
  for (i = 0; i < 2; i ++)
    if (a[i])
      abort ();
  return 0;
}