PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / builtins / memset.c
blobcf7c1e303e8a657dd45901c4ef2e33b8d72ffca0
1 /* Copyright (C) 2002, 2003 Free Software Foundation.
3 Ensure that builtin memset operations for constant length and
4 non-constant assigned value don't cause compiler problems.
6 Written by Roger Sayle, 21 April 2002. */
8 extern void abort (void);
9 typedef __SIZE_TYPE__ size_t;
10 extern void *memset (void *, int, size_t);
12 char buffer[32];
13 int argc = 1;
15 void
16 main_test (void)
18 memset (buffer, argc, 0);
19 memset (buffer, argc, 1);
20 memset (buffer, argc, 2);
21 memset (buffer, argc, 3);
22 memset (buffer, argc, 4);
23 memset (buffer, argc, 5);
24 memset (buffer, argc, 6);
25 memset (buffer, argc, 7);
26 memset (buffer, argc, 8);
27 memset (buffer, argc, 9);
28 memset (buffer, argc, 10);
29 memset (buffer, argc, 11);
30 memset (buffer, argc, 12);
31 memset (buffer, argc, 13);
32 memset (buffer, argc, 14);
33 memset (buffer, argc, 15);
34 memset (buffer, argc, 16);
35 memset (buffer, argc, 17);