builtin-has-attribute-4.c: Skip on 32-bit hppa*-*-hpux*.
[official-gcc.git] / gcc / testsuite / gcc.dg / pr24615.c
blob9e42911750dd463967185003ae7a64d49f64b794
2 /* { dg-do compile { target fpic } } */
3 /* { dg-options "-Os -fPIC" } */
5 void *memset (void *, int, __SIZE_TYPE__);
6 void *memcpy (void *, const void *, __SIZE_TYPE__);
8 char *alloc (int);
10 char *
11 test (int type, int size, char *data, int len)
13 char *block = alloc (size);
14 char *bp = block;
16 *bp++ = type;
17 switch (type)
19 case 0:
20 case 1:
21 memset (bp, type == 0 ? 0x00 : 0xff, size);
22 memcpy (bp, data, len);
25 return block;