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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [struct/] [w_prof_local_var.c] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
#include <stdlib.h>
2
typedef struct
3
{
4
  int a;
5
  float b;
6
}str_t;
7
 
8
#ifdef STACK_SIZE
9
#if STACK_SIZE > 8000
10
#define N 1000
11
#else
12
#define N (STACK_SIZE/8)
13
#endif
14
#else
15
#define N 1000
16
#endif
17
 
18
int
19
main ()
20
{
21
  int i, sum;
22
 
23
  str_t * p = malloc (N * sizeof (str_t));
24
  if (p == NULL)
25
    return 0;
26
  for (i = 0; i < N; i++)
27
    p[i].b = i;
28
 
29
  for (i = 0; i < N; i++)
30
    p[i].a = p[i].b + 1;
31
 
32
  for (i = 0; i < N; i++)
33
    if (p[i].a != p[i].b + 1)
34
      abort ();
35
 
36
  return 0;
37
}
38
 
39
/*--------------------------------------------------------------------------*/
40
/* { dg-final-use { scan-ipa-dump "Number of structures to transform is 1" "ipa_struct_reorg" } } */
41
/* { 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.