20021212-1.c: New test.

2002-12-12  Eric Botcazou  <ebotcazou@libertysurf.fr>

	* gcc.c-torture/compile/20021212-1.c: New test.

From-SVN: r60068
This commit is contained in:
Eric Botcazou 2002-12-12 12:09:39 +01:00 committed by Eric Botcazou
parent a5163dcdac
commit 2eb96bdbd4
2 changed files with 19 additions and 0 deletions

View file

@ -1,3 +1,7 @@
2002-12-12 Eric Botcazou <ebotcazou@libertysurf.fr>
* gcc.c-torture/compile/20021212-1.c: New test.
2002-12-11 Neil Booth <neil@daikokuya.co.uk>
* gcc.dg/fshort-wchar: New test.

View file

@ -0,0 +1,15 @@
/* PR optimization/8334 */
/* Verify that GCC produces valid operands
after simplifying an addition. */
void foo(int m, int n, double *f)
{
int i, j, k = 1;
for (j = 0; j < n; j++) {
for (i = k; i < m; i++) {
f[i] = (double) (i * j);
f[i + j] = (double) ((i + 1) * j);
}
}
}