URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 298 |
Rev 378 |
/* { dg-do compile } */
|
/* { dg-do compile } */
|
/* { dg-options "-O2 -fprofile-generate" } */
|
/* { dg-options "-O2 -fprofile-generate" } */
|
|
|
struct S
|
struct S
|
{
|
{
|
int a;
|
int a;
|
void **b;
|
void **b;
|
};
|
};
|
|
|
void
|
void
|
foo (struct S *x, int y)
|
foo (struct S *x, int y)
|
{
|
{
|
if (!x)
|
if (!x)
|
return;
|
return;
|
if (y >= x->a)
|
if (y >= x->a)
|
return;
|
return;
|
x->a--;
|
x->a--;
|
for (; y < x->a; y++)
|
for (; y < x->a; y++)
|
x->b[y] = x->b[y + 1];
|
x->b[y] = x->b[y + 1];
|
x->b[x->a] = (void *) 0;
|
x->b[x->a] = (void *) 0;
|
}
|
}
|
|
|
/* { dg-final { cleanup-coverage-files } } */
|
|
|
|
No newline at end of file
|
No newline at end of file
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.