Imported Upstream version 4.8.1
[platform/upstream/gcc48.git] / gcc / testsuite / gcc.dg / tree-ssa / slsr-27.c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-dom2" } */
3
4 struct x
5 {
6   int a[16];
7   int b[16];
8   int c[16];
9 };
10
11 extern void foo (int, int, int);
12
13 void
14 f (struct x *p, unsigned int n)
15 {
16   foo (p->a[n], p->c[n], p->b[n]);
17 }
18
19 /* { dg-final { scan-tree-dump-times "\\* 4;" 1 "dom2" } } */
20 /* { dg-final { scan-tree-dump-times "p_\\d\+\\(D\\) \\+ \[^\r\n\]*_\\d\+;" 1 "dom2" } } */
21 /* { dg-final { scan-tree-dump-times "MEM\\\[\\(struct x \\*\\)\[^\r\n\]*_\\d\+" 3 "dom2" } } */
22 /* { dg-final { cleanup-tree-dump "dom2" } } */