view gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-3.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-lim2-details" } */

struct { int x; int y; } global;
void foo(int n)
{
  int i;
  for ( i=0; i<n; i++)
    global.y += global.x*global.x;
}

/* { dg-final { scan-tree-dump "Executing store motion of global.y" "lim2" } } */
/* { dg-final { scan-tree-dump "Moving statement.*global.x.*out of loop 1" "lim2" } } */