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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.ext/] [restrict1.C] - Blame information for rev 699

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do assemble  }
2
 
3
// Copyright (C) 1999 Free Software Foundation, Inc.
4
// Contributed by Nathan Sidwell 14 Nov 1999 
5
// Test our restrict object pointer extension
6
 
7
struct A
8
{
9
  void f1() __restrict__;
10
  void g1(int *__restrict__);
11
  void f2() __restrict__;
12
  void g2(int *__restrict__);
13
  void f3();
14
  void g3(int *);
15
  void f4();
16
  void g4(int *);
17
};
18
 
19
void A::f1 () __restrict__ {}
20
void A::g1 (int *__restrict__) {}
21
 
22
void A::f2 () {}
23
void A::g2 (int *) {}
24
 
25
void A::f3 () __restrict__ {}
26
void A::g3 (int *__restrict__) {}
27
 
28
void A::f4 () {}
29
void A::g4 (int *) {}
30
 
31
template  struct X
32
{
33
  void f1() __restrict__;
34
  void g1(int *__restrict__);
35
  void f2() __restrict__;
36
  void g2(int *__restrict__);
37
  void f3();
38
  void g3(int *);
39
  void f4();
40
  void g4(int *);
41
};
42
 
43
template  void X::f1 () __restrict__ {}
44
template  void X::g1 (int *__restrict__) {}
45
template  void X::f2 () {}
46
template  void X::g2 (int *) {}
47
template  void X::f3 () __restrict__ {}
48
template  void X::g3 (int *__restrict__) {}
49
template  void X::f4 () {}
50
template  void X::g4 (int *) {}
51
 
52
void fn ()
53
{
54
  X g;
55
 
56
  g.f1 ();
57
  g.f2 ();
58
  g.f3 ();
59
  g.f4 ();
60
}

powered by: WebSVN 2.1.0

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