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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do assemble  }
2
// { dg-options "-O3" }
3
// Origin: Mark Mitchell 
4
 
5
class ostream;
6
 
7
struct S
8
{
9
  virtual void print(ostream&) const = 0;
10
};
11
 
12
template 
13
class vector
14
{
15
public:
16
  _Tp& operator[](unsigned __n) const { return *(_M_start + __n); }
17
  _Tp* _M_start;
18
};
19
 
20
class T
21
{
22
public:
23
 
24
  void print(ostream&) const;
25
 
26
  vector bcList_m;
27
};
28
 
29
void T::print(ostream& o) const
30
{
31
  int n = 3;
32
 
33
  for (int i = 0; i < n; ++i)
34
    bcList_m[i]->print(o);
35
  return;
36
}
37
 
38
ostream&
39
operator<<(ostream& o, const T& bcList)
40
{
41
  bcList.print(o);
42
  return o;
43
}
44
 
45
 
46
 
47
 
48
 
49
 
50
 
51
 

powered by: WebSVN 2.1.0

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