| 1 |
int i; |
| 2 |
|
| 3 |
__attribute__((noinline, noclone)) void |
| 4 |
bar (char *p) |
| 5 |
{ |
| 6 |
if (i < 1 || i > 6) |
| 7 |
__builtin_abort (); |
| 8 |
if (__builtin_memcmp (p, "abcdefg", i + 1) != 0) |
| 9 |
__builtin_abort (); |
| 10 |
__builtin_memset (p, ' ', 7); |
| 11 |
} |
| 12 |
|
| 13 |
__attribute__((noinline, noclone)) void |
| 14 |
foo (char *p, unsigned long l) |
| 15 |
{ |
| 16 |
if (l < 1 || l > 6) |
| 17 |
return; |
| 18 |
char buf[7]; |
| 19 |
__builtin_memcpy (buf, p, l + 1); |
| 20 |
bar (buf); |
| 21 |
} |
| 22 |
|
| 23 |
int |
| 24 |
main () |
| 25 |
{ |
| 26 |
for (i = 0; i < 16; i++) |
| 27 |
foo ("abcdefghijklmnop", i); |
| 28 |
return 0; |
| 29 |
} |