OSDN Git Service

2011-12-19 Sandra Loosemore <sandra@codesourcery.com>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.c-torture / compile / 20021212-1.c
1 /* PR optimization/8334 */
2 /* Verify that GCC produces valid operands
3    after simplifying an addition. */
4
5 void foo(int m, int n, double *f)
6 {
7   int i, j, k = 1;
8
9   for (j = 0; j < n; j++) {
10     for (i = k; i < m; i++) {
11       f[i] = (double) (i * j);
12       f[i + j] = (double) ((i + 1) * j);
13     }
14   }
15 }