]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-cse-5.c
Fix profile update in tree_transform_and_unroll_loop
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-dom-cse-5.c
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
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"} } */