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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [testsuite/] [gdb.c++/] [cttiadd.cc] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 106 markom
template<class T> T add(T v1, T v2)
2
{
3
   T v3;
4
   v3 = v1;
5
   v3 += v2;
6
   return v3;
7
 }
8
 
9
int main()
10
{
11
  char c;
12
  int i;
13
  float f;
14
  extern void add1();
15
  extern void subr2();
16
  extern void subr3();
17
 
18
  c = 'a';
19
  i = 2;
20
  f = 4.5;
21
 
22
  c = add(c, c);
23
  i = add(i, i);
24
  f = add(f, f);
25
 
26
  add1();
27
  subr2();
28
  subr3();
29
}

powered by: WebSVN 2.1.0

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