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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [struct/] [wo_prof_escape_substr_value.c] - Blame information for rev 319

Go to most recent revision | 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 > 8000
13
#define N 1000
14
#else
15
#define N (STACK_SIZE/8)
16
#endif
17
#else
18
#define N 1000
19
#endif
20
 
21
 
22
typedef struct
23
{
24
  str_t sub_str;
25
  int c;
26
}str_with_substr_t;
27
 
28
int
29
main ()
30
{
31
  int i;
32
  str_with_substr_t A[N];
33
 
34
  for (i = 0; i < N; i++)
35
    A[i].sub_str.a = 5;
36
 
37
  for (i = 0; i < N; i++)
38
    if (A[i].sub_str.a != 5)
39
      abort ();
40
 
41
  return 0;
42
}
43
 
44
/*--------------------------------------------------------------------------*/
45
/* { dg-final { scan-ipa-dump "is a field in the structure" "ipa_struct_reorg" } } */
46
/* { 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.