aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr99578-1.c
blob: 030f3bd3cf91213862a5c8d7bd7d5ef48c54c0e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* PR middle-end/99578 */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-not "&MEM" "optimized" } } */
/* { dg-final { scan-tree-dump-times "PHI <-?1\\\(\[0-9\]+\\\), -?1\\\(\[0-9\]+\\\)>" 2 "optimized" } } */

struct S { int a, b[4]; };
struct T { int a, b[8192], c[4]; };

int
foo (struct S *p)
{
  if (p) return -1;
  return p->b == (void *)4;
}

int
bar (struct T *p)
{
  if (p) return -1;
  return p->c == (void *)32772;
}