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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [tree-ssa/] [restrict2.C] - Blame information for rev 742

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

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
// { dg-options "-O2 -fdump-tree-optimized" }
3
 
4
struct S { int *__restrict p; int q; };
5
S s;
6
 
7
int
8
f1 (S x, S y)
9
{
10
  x.p[0] = 1;
11
  y.p[0] = 0;
12
// { dg-final { scan-tree-dump-times "return 1" 1 "optimized" } }
13
  return x.p[0];
14
}
15
 
16
int
17
f2 (S x)
18
{
19
  x.p[0] = 2;
20
  s.p[0] = 0;
21
// { dg-final { scan-tree-dump-times "return 2" 1 "optimized" } }
22
  return x.p[0];
23
}
24
 
25
int
26
f3 (S &__restrict x, S &__restrict y)
27
{
28
  x.p[0] = 3;
29
  y.p[0] = 0;
30
// { dg-final { scan-tree-dump-times "return 3" 1 "optimized" } }
31
  return x.p[0];
32
}
33
 
34
int
35
f4 (S &x, S &y)
36
{
37
  x.p[0] = 4;
38
  y.p[0] = 0;
39
// { dg-final { scan-tree-dump-times "return 4" 0 "optimized" } }
40
  return x.p[0];
41
}
42
 
43
int
44
f5 (S *__restrict x, S *__restrict y)
45
{
46
  x->p[0] = 5;
47
  y->p[0] = 0;
48
// We might handle this some day
49
// { dg-final { scan-tree-dump-times "return 5" 1 "optimized" { xfail *-*-* } } }
50
  return x->p[0];
51
}
52
 
53
int
54
f6 (S *x, S *y)
55
{
56
  x->p[0] = 6;
57
  y->p[0] = 0;
58
// { dg-final { scan-tree-dump-times "return 6" 0 "optimized" } }
59
  return x->p[0];
60
}
61
 
62
// { 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.