OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gcc.dg/] [struct/] [wo_prof_escape_substr_pointer.c] - Blame information for rev 384

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-do run } */
3
 
4
#include <stdlib.h>
5
typedef struct
6
{
7
  int a;
8
  float b;
9
}str_t;
10
 
11
#ifdef STACK_SIZE
12
#if STACK_SIZE > 16000
13
#define N 1000
14
#else
15
#define N (STACK_SIZE/16)
16
#endif
17
#else
18
#define N 1000
19
#endif
20
 
21
typedef struct
22
{
23
  str_t * sub_str;
24
  int c;
25
}str_with_substr_t;
26
 
27
int foo;
28
 
29
int
30
main (void)
31
{
32
  int i;
33
  str_with_substr_t A[N];
34
  str_t a[N];
35
 
36
  for (i=0; i < N; i++)
37
    A[i].sub_str = &(a[i]);
38
 
39
  for (i=0; i < N; i++)
40
    A[i].sub_str->a = 5;
41
 
42
  foo = A[56].sub_str->a;
43
 
44
  return 0;
45
}
46
 
47
/*--------------------------------------------------------------------------*/
48
/* { dg-final { scan-ipa-dump "is a field in the structure" "ipa_struct_reorg" } } */
49
/* { dg-final { cleanup-ipa-dump "*" } } */

powered by: WebSVN 2.1.0

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