OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.dg/] [struct/] [w_prof_global_var.c] - Diff between revs 298 and 338

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 "*" } } */
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.