aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/scal.c
blob: a2fb3e812257d43117d6a73c6695fdf1781bcd0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* { dg-require-effective-target untyped_assembly } */
int g1, g2;

void
write_at (addr, off, val)
     int *addr;
     int off;
     int val;
{
  g2 = 1;
  addr[off] = val;
  g2++;
}

main ()
{
  g2 = 12;
  write_at (&g1, &g2 - &g1, 12345);
  printf ("%d\n", g2);
}