1 /* PR tree-optimization/83456 - -Wrestrict false positive on
2 a non-overlapping memcpy in an inline function
4 { dg-options "-O2 -Wrestrict -ftrack-macro-expansion=0" } */
6 extern void* memcpy (void*, const void*, __SIZE_TYPE__
);
8 /* Test case from comment #0. */
10 inline void pr83456_comment0 (void *d
, void *s
, unsigned N
)
16 void call_pr83456_comment0 (void* src
)
18 pr83456_comment0 (src
, src
, 1);
22 /* Test case from comment #1. */
26 void pr83456_comment1 (unsigned n
)
28 for (int i
= 0; i
< 1; i
++)
37 /* Test case from comment #2. */
44 struct netdevice
*dev
;
49 struct netdevice
*fb_tunnel_dev
;
52 void ipip6_tunnel_clone_6rd (struct netdevice
*dev
, struct sit_net
*sitn
)
54 struct ip_tunnel
*t
= dev
->priv
;
55 if (t
->dev
== sitn
->fb_tunnel_dev
)
58 struct ip_tunnel
*t0
= sitn
->fb_tunnel_dev
->priv
;
59 memcpy(&t
->ip6rd
, &t0
->ip6rd
, sizeof(t
->ip6rd
));
62 void sit_init_net (struct sit_net
*sitn
, struct netdevice
*fb_tunnel_dev
)
64 sitn
->fb_tunnel_dev
= fb_tunnel_dev
;
65 ipip6_tunnel_clone_6rd (sitn
->fb_tunnel_dev
, sitn
);