URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 298 |
Rev 338 |
#include <stdlib.h>
|
#include <stdlib.h>
|
typedef struct
|
typedef struct
|
{
|
{
|
int a;
|
int a;
|
float b;
|
float b;
|
}str_t;
|
}str_t;
|
|
|
#ifdef STACK_SIZE
|
#ifdef STACK_SIZE
|
#if STACK_SIZE > 8000
|
#if STACK_SIZE > 8000
|
#define N 1000
|
#define N 1000
|
#else
|
#else
|
#define N (STACK_SIZE/8)
|
#define N (STACK_SIZE/8)
|
#endif
|
#endif
|
#else
|
#else
|
#define N 1000
|
#define N 1000
|
#endif
|
#endif
|
|
|
str_t *p;
|
str_t *p;
|
|
|
int
|
int
|
main ()
|
main ()
|
{
|
{
|
int i, sum;
|
int i, sum;
|
|
|
p = malloc (N * sizeof (str_t));
|
p = malloc (N * sizeof (str_t));
|
if (p == NULL)
|
if (p == NULL)
|
return 0;
|
return 0;
|
for (i = 0; i < N; i++)
|
for (i = 0; i < N; i++)
|
p[i].b = i;
|
p[i].b = i;
|
|
|
for (i = 0; i < N; i++)
|
for (i = 0; i < N; i++)
|
p[i].a = p[i].b + 1;
|
p[i].a = p[i].b + 1;
|
|
|
for (i = 0; i < N; i++)
|
for (i = 0; i < N; i++)
|
if (p[i].a != p[i].b + 1)
|
if (p[i].a != p[i].b + 1)
|
abort ();
|
abort ();
|
|
|
return 0;
|
return 0;
|
}
|
}
|
|
|
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
/* { dg-final-use { scan-ipa-dump "Number of structures to transform is 1" "ipa_struct_reorg" { xfail { "avr-*-*" } } } } */
|
/* { dg-final-use { scan-ipa-dump "Number of structures to transform is 1" "ipa_struct_reorg" { xfail { "avr-*-*" } } } } */
|
/* { dg-final-use { cleanup-ipa-dump "*" } } */
|
/* { dg-final-use { cleanup-ipa-dump "*" } } */
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.