1 /* { dg-do run } */
2 /* m32c is already packed.  */
3 /* { dg-skip-if "" { "m32c-*-*" } } */
4 
5 void *memcpy(void *dest, const void *src, __SIZE_TYPE__ n);
6 
7 struct timeval {
8     long tv_sec;
9 };
10 
11 struct outdata {
12     long align;
13     char seq;
14     struct timeval tv __attribute__((packed)); /* { dg-warning "attribute ignored" "" { target default_packed } } */
15 };
16 
17 void send_probe(struct outdata *outdata, struct timeval *tp) __attribute__((noinline));
send_probe(struct outdata * outdata,struct timeval * tp)18 void send_probe(struct outdata *outdata, struct timeval *tp)
19 {
20     memcpy(&outdata->tv, tp, sizeof outdata->tv);
21 }
22 
23 struct timeval t;
24 struct outdata outdata;
25 
main()26 int main()
27 {
28   send_probe(&outdata, &t);
29   return 0;
30 }
31