PR c/64856
[official-gcc.git] / gcc / testsuite / gcc.dg / ssp-4.c
blob402033c240de677094a8af418395e23c675bbf59
1 /* { dg-do assemble } */
2 /* { dg-options "-fstack-protector-strong -O1 -frename-registers" } */
3 /* { dg-require-effective-target fstack_protector } */
5 typedef unsigned int uint32_t;
6 struct ctx
8 uint32_t A;
9 };
11 void *
12 buffer_copy (const struct ctx *ctx, void *resbuf)
14 uint32_t buffer[4];
15 buffer[0] = (ctx->A);
16 __builtin_memcpy (resbuf, buffer, sizeof (buffer));
17 return resbuf;