summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/slsr-27.c
blob: eb5734ae5433db0687afb1c953003d370d7cf7c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-dom2" } */

struct x
{
  int a[16];
  int b[16];
  int c[16];
};

extern void foo (int, int, int);

void
f (struct x *p, unsigned int n)
{
  foo (p->a[n], p->c[n], p->b[n]);
}

/* { dg-final { scan-tree-dump-times "\\* 4;" 1 "dom2" } } */
/* { dg-final { scan-tree-dump-times "p_\\d\+\\(D\\) \\+ \[^\r\n\]*_\\d\+;" 1 "dom2" } } */
/* { dg-final { scan-tree-dump-times "MEM\\\[\\(struct x \\*\\)\[^\r\n\]*_\\d\+" 3 "dom2" } } */
/* { dg-final { cleanup-tree-dump "dom2" } } */