8sa1-gcc/gcc/testsuite/gcc.c-torture/execute/ptr-arith-1.c
Jeff Law 921e5a0eb4 Initial revision
From-SVN: r14840
1997-08-19 01:34:40 -06:00

15 lines
180 B
C

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);
}