1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-fre1-stats" } */
3 
vnum_test8(int * data)4 void vnum_test8(int *data)
5 {
6   int i;
7   int stop = data[3];
8   int m = data[4];
9   int n = m;
10   for (i=0; i<stop; i++) {
11     int k = data[2];
12     data[k] = 2;
13     data[0] = m - n;
14     k = data[1];
15     m = m + k;
16     n = n + k;
17   }
18 }
19 /* We should eliminate m - n, and set n = n + k into n = m. */
20 /* { dg-final { scan-tree-dump-times "Eliminated: 3" 1 "fre1"} } */
21