aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.hp/ctti-add.cc
blob: 1f50fae24c1dc84c8b38a1a376c07f168d1fdf9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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();
}