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/] [tree-ssa/] [alias-18.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-options "-O2 -fdump-tree-fre-details -fdump-tree-optimized" } */
3
 
4
struct A {
5
  int i;
6
  int j;
7
  float x;
8
};
9
struct B {
10
  struct A a;
11
  int k;
12
};
13
 
14
int g;
15
 
16
int test0 (struct A *p, struct A *q)
17
{
18
  p->i = 0;
19
  q->j = -1;
20
  return p->i;
21
}
22
 
23
int test1 (struct A *p, struct B *q)
24
{
25
  p->i = 1;
26
  q->k = -1;
27
  return p->i;
28
}
29
 
30
int test2 (struct A *p, struct B *q)
31
{
32
  p->i = 2;
33
  q->a.i = -1;
34
  return p->i;
35
}
36
 
37
int test3 (struct A *p, struct B *q)
38
{
39
  p->i = 3;
40
  q->a.j = -1;
41
  return p->i;
42
}
43
 
44
int test4 (struct A *p)
45
{
46
  g = 4;
47
  p->i = -1;
48
  return g;
49
}
50
 
51
int test5 (struct A *p)
52
{
53
  p->i = 5;
54
  g = -1;
55
  return p->i;
56
}
57
 
58
int test6 (struct A *p, int *q)
59
{
60
  p->i = 6;
61
  *q = -1;
62
  return p->i;
63
}
64
 
65
int test7 (struct A *p, int *q)
66
{
67
  p->j = 7;
68
  *q = -1;
69
  return p->j;
70
}
71
 
72
int test8 (struct A *p, int *q)
73
{
74
  *q = 8;
75
  p->x = -1;
76
  return *q;
77
}
78
 
79
/* { dg-final { scan-tree-dump "with 0" "fre" } } */
80
/* { dg-final { scan-tree-dump "with 1" "fre" } } */
81
/* { dg-final { scan-tree-dump "with 3" "fre" } } */
82
/* { dg-final { scan-tree-dump "with 4" "fre" } } */
83
/* { dg-final { scan-tree-dump "with 5" "fre" } } */
84
/* { dg-final { scan-tree-dump "with 8" "fre" } } */
85
/* { dg-final { scan-tree-dump-not "return 2;" "optimized" } } */
86
/* { dg-final { scan-tree-dump-not "return 6;" "optimized" } } */
87
/* { dg-final { scan-tree-dump-not "return 7;" "optimized" } } */
88
/* { dg-final { scan-tree-dump-not "return -1;" "optimized" } } */
89
/* { dg-final { cleanup-tree-dump "fre" } } */
90
/* { dg-final { cleanup-tree-dump "optimized" } } */

powered by: WebSVN 2.1.0

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