* gcc.dg/loop-6.c: New test.

From-SVN: r91378
This commit is contained in:
Falk Hueffner 2004-11-27 17:49:53 +01:00 committed by Eric Botcazou
parent 2fd1350624
commit 0c00d5f3da
2 changed files with 29 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2004-11-27 Falk Hueffner <falk@debian.org>
* gcc.dg/loop-6.c: New test.
2004-11-27 Jakub Jelinek <jakub@redhat.com>
* gcc.c-torture/execute/20041126-1.c: New test.

View File

@ -0,0 +1,25 @@
/* PR optimization/18577 */
/* Origin: Falk Hueffner <falk@debian.org> */
/* { dg-do run } */
/* { dg-options "-O2 -funroll-all-loops" } */
static float tfcos12[3];
__attribute__((noinline)) double f(double x) { return x; }
int g;
int main(void)
{
int i, j;
for (i = 0; i < 1; i++)
tfcos12[i] = 0.5;
for (i = 0; i < 1; i++)
{
tfcos12[i] = 0.5 * f(i);
for (j = 0; j < 12; j++)
g++;
}
return 0;
}