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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [gdb/] [testsuite/] [gdb.c++/] [cttiadd.cc] - Rev 1765

Compare with Previous | Blame | View Log

template<class T> T add(T v1, T v2)
{
   T v3;
   v3 = v1;
   v3 += v2;
   return v3;
 }
 
int main()
{
  char c;
  int i;
  float f;
  extern void add1();
  extern void subr2();
  extern void subr3();
 
  c = 'a';
  i = 2;
  f = 4.5;
 
  c = add(c, c);
  i = add(i, i);
  f = add(f, f);
 
  add1();
  subr2();
  subr3();
}
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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