1 /* Test normalization of ARRAY_REF expressions to MEM_REFs in dom.  */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fno-tree-fre -fdump-tree-dom2" } */
4 
5 #define N 8
6 
7 int
main(int argc,char ** argv)8 main (int argc, char **argv)
9 {
10   int a[N];
11   for (int i = 0; i < N; i++)
12     a[i] = 2*i + 1;
13   int *p = &a[0];
14   __builtin_printf ("%d\n", a[argc]);
15   return *(++p);
16 }
17 
18 /* { dg-final { scan-tree-dump-times "return 3;" 1 "dom2"} } */
19