Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/pr88775-2.c

raw
1 /* PR tree-optimization/88775 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-optimized" } */
4 /* These can't be decided until we know how the variables will
5 be laid out in memory. */
6 /* { dg-final { scan-tree-dump-not "return 1;" "optimized" } } */
7
8 int a[64] = {};
9 int b[64] = {};
10 int e[0] = {};
11 int f[0] = {};
12
13 int
14 f1 (void)
15 {
16 return (__UINTPTR_TYPE__) &a[0] != (__UINTPTR_TYPE__) &b[64];
17 }
18
19 int
20 f2 (void)
21 {
22 return (__UINTPTR_TYPE__) &a[64] != (__UINTPTR_TYPE__) &b[0];
23 }
24
25 int
26 f3 (void)
27 {
28 return (__UINTPTR_TYPE__) &e[0] != (__UINTPTR_TYPE__) &f[0];
29 }
30
31 int
32 f4 (void)
33 {
34 int c[64] = {}, d[64] = {};
35 return (__UINTPTR_TYPE__) &c[0] != (__UINTPTR_TYPE__) &d[64];
36 }
37
38 int
39 f5 (void)
40 {
41 int c[64] = {}, d[64] = {};
42 return (__UINTPTR_TYPE__) &c[64] != (__UINTPTR_TYPE__) &d[0];
43 }
44
45 /* { dg-prune-output "-Wreturn-local-addr" } */