1 /* Copyright (C) 2002 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);
17 memset (buffer
, argc
, 0);
18 memset (buffer
, argc
, 1);
19 memset (buffer
, argc
, 2);
20 memset (buffer
, argc
, 3);
21 memset (buffer
, argc
, 4);
22 memset (buffer
, argc
, 5);
23 memset (buffer
, argc
, 6);
24 memset (buffer
, argc
, 7);
25 memset (buffer
, argc
, 8);
26 memset (buffer
, argc
, 9);
27 memset (buffer
, argc
, 10);
28 memset (buffer
, argc
, 11);
29 memset (buffer
, argc
, 12);
30 memset (buffer
, argc
, 13);
31 memset (buffer
, argc
, 14);
32 memset (buffer
, argc
, 15);
33 memset (buffer
, argc
, 16);
34 memset (buffer
, argc
, 17);
40 /* When optimizing, most of the above cases should be transformed into
41 something else. So any remaining calls to the original function
42 for short lengths should abort. */
44 memset (void *dst
, int c
, size_t len
)