view gcc/testsuite/gcc.dg/tree-ssa/pr84512.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
line wrap: on
line source

/* { dg-do compile } */
/* { dg-options "-O3 -fdump-tree-optimized" } */

int foo()
{
  int a[10];
  for(int i = 0; i < 10; ++i)
    a[i] = i*i;
  int res = 0;
  for(int i = 0; i < 10; ++i)
    res += a[i];
  return res;
}

/* Listed targets xfailed due to PR84958.  */
/* { dg-final { scan-tree-dump "return 285;" "optimized" { xfail { amdgcn*-*-* nvptx*-*-* } } } } */