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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-options "-O3 -fno-inline -fno-ipa-sra -fipa-type-escape -fdump-ipa-all -fipa-struct-reorg -fwhole-program -combine" } */
2
/* { dg-do compile } */
3
/* { dg-do run } */
4
 
5
#include <stdlib.h>
6
struct str
7
{
8
  int a;
9
  float b;
10
};
11
 
12
#ifdef STACK_SIZE
13
#if STACK_SIZE > 8000
14
#define N 1000
15
#else
16
#define N (STACK_SIZE/8)
17
#endif
18
#else
19
#define N 1000
20
#endif
21
 
22
int
23
foo (struct str * p_str)
24
{
25
  static int sum = 0;
26
 
27
  sum = sum + p_str->a;
28
  return sum;
29
}
30
 
31
int
32
main ()
33
{
34
  int i, sum;
35
  struct str * p = malloc (N * sizeof (struct str));
36
  if (p == NULL)
37
    return 0;
38
  for (i = 0; i < N; i++)
39
    sum = foo (p+i);
40
 
41
  return 0;
42
}
43
 
44
/*--------------------------------------------------------------------------*/
45
/* { dg-final { scan-ipa-dump "is passed to local function...Excluded." "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.