view gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-cse-5.c @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* Test normalization of ARRAY_REF expressions to MEM_REFs in dom.  */
/* { dg-do compile } */
/* { dg-options "-O2 -fno-tree-fre -fdump-tree-dom2" } */

#define N 8

int
main (int argc, char **argv)
{
  int a[N];
  for (int i = 0; i < N; i++)
    a[i] = 2*i + 1;
  int *p = &a[0];
  __builtin_printf ("%d\n", a[argc]);
  return *(++p);
}

/* { dg-final { scan-tree-dump-times "return 3;" 1 "dom2"} } */