1 /* { dg-do compile } */ 2 /* { dg-options "-O2 -fno-tree-loop-im -fdump-tree-pre-stats" } */ 3 4 struct { int x; int y; } global; foo(int n)5void foo(int n) 6 { 7 int i; 8 for ( i=0; i<n; i++) 9 global.y += global.x*global.x; 10 } 11 12 /* { dg-final { scan-tree-dump "Eliminated: 3" "pre" } } */ 13