PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / restrict-5.c
blobfc03c1e9c1ca593b8894336da1d16c0be62fa514
1 /* { dg-do compile } */
2 /* { dg-options "-O -fno-strict-aliasing -fdump-tree-lim2-details" } */
4 static inline __attribute__((always_inline))
5 void f(int * __restrict__ r,
6 int a[__restrict__ 16][16],
7 int b[__restrict__ 16][16],
8 int i, int j)
10 int x;
11 *r = 0;
12 for (x = 1; x < 16; ++x)
13 *r = *r + a[i][x] * b[x][j];
16 void g(int *r, int a[16][16], int b[16][16], int i, int j)
18 f (r, a, b, i ,j);
21 /* We should apply store motion to the store to *r. */
23 /* { dg-final { scan-tree-dump "Executing store motion of \\\*r" "lim2" } } */