1 /* Exercise that -Warray-bounds is handled correctly for subobjects.
2 Test case derived from the halt_fast_timekeeper function in Linux
3 kernel/time/timekeeping.c.
5 { dg-options "-O2 -Warray-bounds=2 -Wno-stringop-overflow -ftrack-macro-expansion=0" } */
23 static void halt_fast_timekeeper (struct B
*b
)
29 __builtin_memcpy (&a
, pa
, sizeof *pa
); /* { dg-bogus "\\\[-Warray-bounds" } */
33 struct C
{ int i
; struct B b
; } c
;
35 void timekeeping_suspend (void)
39 halt_fast_timekeeper (p
);