Debian Codegraph @

gcc/testsuite/g++.dg/tree-ssa/restrict1.C

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-lim2-details" } */
3
4 struct Foo
5 {
6 Foo();
7 Foo(const Foo&);
8 int n;
9 int * __restrict__ p;
10 };
11 void bar(Foo f, int * __restrict__ q)
12 {
13 for (int i = 0; i < f.n; ++i)
14 {
15 *q += f.p[i];
16 }
17 }
18
19 /* { dg-final { scan-tree-dump "Executing store motion" "lim2" } } */