Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gcc.dg / Wstringop-overflow-pr106904.c
blob15e67c28c15d09ad3b2f1b67c2cc5bc2ad33c32a
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -Wstringop-overflow -fno-vect-cost-model" } */
4 struct windowpos
6 int hwnd;
7 int hwnd2;
8 };
10 struct packed_windowpos
12 int hwnd;
13 int pad1;
14 int hwnd2;
15 int pad2;
18 struct packed_structs
20 struct packed_windowpos wp;
23 void func(struct packed_structs *ps)
25 struct windowpos wp;
27 wp.hwnd = ps->wp.hwnd;
28 wp.hwnd2 = ps->wp.hwnd2;
29 __builtin_memcpy(&ps->wp, &wp, sizeof(wp)); /* { dg-bogus "into a region" } */