blob: a81857c0c3de228eec5f53ee9864e8de70d0c5be [file] [log] [blame]
/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-lim1-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" "lim1" } } */
/* { dg-final { scan-tree-dump "Moving statement.*global.x.*out of loop 1" "lim1" } } */
/* { dg-final { cleanup-tree-dump "lim1" } } */