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/] [wo_prof_mult_field_peeling.c] - Blame information for rev 338

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
  int c;
10
  float d;
11
}str_t;
12
 
13
#ifdef STACK_SIZE
14
#if STACK_SIZE > 1600
15
#define N 100
16
#else
17
#define N (STACK_SIZE/16)
18
#endif
19
#else
20
#define N 100
21
#endif
22
 
23
int
24
main ()
25
{
26
  int i;
27
  str_t *p = malloc (N * sizeof (str_t));
28
  if (p == NULL)
29
    return 0;
30
  for (i = 0; i < N; i++)
31
    p[i].a = 5;
32
 
33
  for (i = 0; i < N; i++)
34
    if (p[i].a != 5)
35
      abort ();
36
 
37
  return 0;
38
}
39
 
40
/*--------------------------------------------------------------------------*/
41
/* The structure str_t is erroneously peeled into 4 structures instead of 2.  */
42
/* { dg-final { scan-ipa-dump "the number of new types is 2" "ipa_struct_reorg" { xfail *-*-* } } } */
43
/* { 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.