111
|
1 /* PR tree-optimization/69172 */
|
|
2 /* { dg-do compile } */
|
|
3 /* { dg-options "-O2" } */
|
|
4
|
|
5 int a;
|
|
6
|
|
7 void *
|
|
8 f1 (void)
|
|
9 {
|
|
10 int *b = &a, *c = &a;
|
|
11 return __builtin___mempcpy_chk (b, c, sizeof (int), 0);
|
|
12 }
|
|
13
|
|
14 void *
|
|
15 f2 (void)
|
|
16 {
|
|
17 int *b = &a;
|
|
18 return __builtin___mempcpy_chk (b, b, sizeof (int), 0);
|
|
19 }
|
|
20
|
|
21 void *
|
|
22 f3 (void)
|
|
23 {
|
|
24 return __builtin___mempcpy_chk (&a, &a, sizeof (int), 0);
|
|
25 }
|
|
26
|
|
27 void *
|
|
28 f4 (int x)
|
|
29 {
|
|
30 int *b = &a, *c = &a;
|
|
31 return __builtin___mempcpy_chk (b, c, x, 0);
|
|
32 }
|
|
33
|
|
34 void *
|
|
35 f5 (int x)
|
|
36 {
|
|
37 int *b = &a;
|
|
38 return __builtin___mempcpy_chk (b, b, x, 0);
|
|
39 }
|
|
40
|
|
41 void *
|
|
42 f6 (int x)
|
|
43 {
|
|
44 return __builtin___mempcpy_chk (&a, &a, x, 0);
|
|
45 }
|