1 /* { dg-do compile } */
2 /* { dg-options "-O3 -fdump-tree-optimized" } */
3 
foo()4 int foo()
5 {
6   int a[10];
7   for(int i = 0; i < 10; ++i)
8     a[i] = i*i;
9   int res = 0;
10   for(int i = 0; i < 10; ++i)
11     res += a[i];
12   return res;
13 }
14 
15 /* Listed targets xfailed due to PR84958.  */
16 /* { dg-final { scan-tree-dump "return 285;" "optimized" { xfail { { alpha*-*-* amdgcn*-*-* nvptx*-*-* } || { sparc*-*-* && lp64 } } } } } */
17