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