summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/ptr-arith-1.c
blob: 46162b8964d8b01937ade4d12fa42da62a16150f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
char *
f (char *s, unsigned int i)
{
  return &s[i + 3 - 1];
}

main ()
{
  char *str = "abcdefghijkl";
  char *x2 = f (str, 12);
  if (str + 14 != x2)
    abort ();
  exit (0);
}