PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / pr59229.c
blobd2a776778de37d5130c5c74089a5ec72a6a4c921
1 int i;
3 __attribute__((noinline, noclone)) void
4 bar (char *p)
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);
13 __attribute__((noinline, noclone)) void
14 foo (char *p, unsigned long l)
16 if (l < 1 || l > 6)
17 return;
18 char buf[7];
19 __builtin_memcpy (buf, p, l + 1);
20 bar (buf);
23 int
24 main ()
26 for (i = 0; i < 16; i++)
27 foo ("abcdefghijklmnop", i);
28 return 0;