aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr107699.c
blob: 4bf864dfd72dca3a7bcc3ed24eec286a264eec69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-forwprop1" } */

struct { int data[16]; } x;

int foo (int n)
{
  int *p = x.data + n;
  /* Should simplify this to n * 4 != 0.  */
  if ((void *)&x != (void *)p)
    return 1;
  return 0;
}

/* { dg-final { scan-tree-dump " != 0" "forwprop1" } } */