| 1 |
/* Test that we error if memset cannot be expanded inline. */ |
| 2 |
|
| 3 |
/* { dg-do compile } */ |
| 4 |
/* { dg-options "-O2" } */ |
| 5 |
|
| 6 |
struct context { |
| 7 |
unsigned int data; |
| 8 |
unsigned int data_end; |
| 9 |
unsigned int data_meta; |
| 10 |
unsigned int ingress; |
| 11 |
unsigned int queue_index; |
| 12 |
unsigned int egress; |
| 13 |
}; |
| 14 |
|
| 15 |
|
| 16 |
void |
| 17 |
set_variable (struct context *ctx) |
| 18 |
{ |
| 19 |
void *data = (void *)(long)ctx->data; |
| 20 |
char *dest = data; |
| 21 |
__builtin_memset (dest, 0xbc, ctx->data_meta); /* { dg-error "could not inline call" } */ |
| 22 |
} |