1 /* PR tree-optimization/69172 - ICE in make_ssa_name_fn,
2 at tree-ssanames.c:266 */
3 /* { dg-do compile } */
4 /* { dg-options "-O2" } */
5
6 int a;
7
8 void *
9 f1 (void)
10 {
11 int *b = &a, *c = &a;
12 return __builtin___mempcpy_chk (b, c, sizeof (int), 0);
13 }
14
15 void *
16 f2 (void)
17 {
18 int *b = &a;
19 return __builtin___mempcpy_chk (b, b, sizeof (int), 0);
20 }
21
22 void *
23 f3 (void)
24 {
25 return __builtin___mempcpy_chk (&a, &a, sizeof (int), 0);
26 }
27
28 void *
29 f4 (int x)
30 {
31 int *b = &a, *c = &a;
32 return __builtin___mempcpy_chk (b, c, x, 0);
33 }
34
35 void *
36 f5 (int x)
37 {
38 int *b = &a;
39 return __builtin___mempcpy_chk (b, b, x, 0);
40 }
41
42 void *
43 f6 (int x)
44 {
45 return __builtin___mempcpy_chk (&a, &a, x, 0);
46 }
47
48 /* The calls above violate strict aliasing. Eliminate the -Wrestrict
49 warnings they trigger.
50 { dg-prune-output "\\\[-Wrestrict]" } */