8sa1-gcc/gcc/testsuite/gcc.c-torture/execute/960327-1.c

31 lines
288 B
C
Raw Normal View History

1997-08-19 03:34:40 -04:00
#include <stdio.h>
g ()
{
return '\n';
}
f ()
{
char s[] = "abcedfg012345";
1997-08-19 03:34:40 -04:00
char *sp = s + 12;
switch (g ())
{
case '\n':
break;
}
while (*--sp == '0')
;
sprintf (sp + 1, "X");
if (s[12] != 'X')
abort ();
}
main ()
{
f ();
exit (0);
}