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