aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.hp/ctti-add1.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.hp/ctti-add1.cc')
-rw-r--r--gdb/testsuite/gdb.hp/ctti-add1.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.hp/ctti-add1.cc b/gdb/testsuite/gdb.hp/ctti-add1.cc
new file mode 100644
index 0000000..7113ece
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/ctti-add1.cc
@@ -0,0 +1,16 @@
+template<class T> T add(T v1, T v2);
+
+void add1()
+{
+ char c;
+ int i;
+ float f;
+
+ c = 'b';
+ i = 3;
+ f = 6.5;
+
+ c = add(c, c);
+ i = add(i, i);
+ f = add(f, f);
+}