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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [ipa/] [ipa-sra-1.c] - Blame information for rev 701

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-O2 -fipa-sra -fdump-tree-eipa_sra-details"  } */
3
 
4
struct bovid
5
{
6
  float red;
7
  int green;
8
  void *blue;
9
};
10
 
11
extern int printf (const char *, ...);
12
extern void abort (void);
13
 
14
static int
15
__attribute__((noinline))
16
ox (struct bovid cow)
17
{
18
  if (cow.green != 6)
19
    abort ();
20
 
21
  printf ("green: %f\nblue: %p\nblue again: %p\n", cow.green,
22
          cow.blue, cow.blue);
23
  return 0;
24
}
25
 
26
int
27
main (int argc, char *argv[])
28
{
29
  struct bovid cow;
30
 
31
  cow.red = 7.4;
32
  cow.green = 6;
33
  cow.blue = &cow;
34
 
35
  ox (cow);
36
  return 0;
37
}
38
 
39
/* { dg-final { scan-tree-dump-times "About to replace expr" 2 "eipa_sra" } } */
40
/* { dg-final { cleanup-tree-dump "eipa_sra" } } */

powered by: WebSVN 2.1.0

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