* gcc.dg/20050330-2.c: New test.

From-SVN: r108243
This commit is contained in:
Jakub Jelinek 2005-12-08 22:44:27 +01:00 committed by Jakub Jelinek
parent 4416de0cf5
commit 88a6bf5e19
2 changed files with 25 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2005-12-08 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/20050330-2.c: New test.
2005-12-08 Erik Edelmann <eedelman@gcc.gnu.org>
PR fortran/25292

View File

@ -0,0 +1,21 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fprofile-generate" } */
struct S
{
int a;
void **b;
};
void
foo (struct S *x, int y)
{
if (!x)
return;
if (y >= x->a)
return;
x->a--;
for (; y < x->a; y++)
x->b[y] = x->b[y + 1];
x->b[x->a] = (void *) 0;
}