| 1 |
/* { dg-do run } */ |
| 2 |
/* { dg-options "-save-temps -Os -fno-inline -mno-long-calls" } */ |
| 3 |
|
| 4 |
#include <string.h> |
| 5 |
#include <stdlib.h> |
| 6 |
|
| 7 |
#define LEN (100) |
| 8 |
short a[LEN]; |
| 9 |
void |
| 10 |
foo (void) |
| 11 |
{ |
| 12 |
memset (a, -1, 14); |
| 13 |
return; |
| 14 |
} |
| 15 |
|
| 16 |
void |
| 17 |
check (signed char *arr, int idx, int len, int v) |
| 18 |
{ |
| 19 |
int i; |
| 20 |
for (i = 0; i < idx; i++) |
| 21 |
if (arr[i] != v) |
| 22 |
abort (); |
| 23 |
|
| 24 |
for (i = idx; i < len; i++) |
| 25 |
if (arr[i] != 0) |
| 26 |
abort (); |
| 27 |
} |
| 28 |
|
| 29 |
int |
| 30 |
main(void) |
| 31 |
{ |
| 32 |
foo (); |
| 33 |
check ((signed char *)a, 14, sizeof (a), -1); |
| 34 |
|
| 35 |
return 0; |
| 36 |
} |
| 37 |
/* { dg-final { scan-assembler "bl?\[ \t\]*memset" { target { ! arm_neon } } } } */ |