view gcc/testsuite/gcc.dg/tree-ssa/20040911-1.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* Verify that points-to information is handled properly for PTR + OFFSET
   pointer arithmetics.  */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-alias-vops" } */

char buf[4], *q;
int foo (int i)
{
  char c, *p;
  q = &c;
  p = buf;
  if (i)
    p = p + 3;
  else
    p = p + 2;
  *p = 6;
  c = 8;
  return *p;
}

/* { dg-final { scan-tree-dump-not "VUSE <c" "alias" } } */