1 /* { dg-do assemble } */
2 /* { dg-options "-fstack-protector-strong -O1 -frename-registers" } */
3 /* { dg-require-effective-target fstack_protector } */
4 
5 typedef unsigned int uint32_t;
6 struct ctx
7 {
8   uint32_t A;
9 };
10 
11 void *
buffer_copy(const struct ctx * ctx,void * resbuf)12 buffer_copy (const struct ctx *ctx, void *resbuf)
13 {
14   uint32_t buffer[4];
15   buffer[0] = (ctx->A);
16   __builtin_memcpy (resbuf, buffer, sizeof (buffer));
17   return resbuf;
18 }
19