summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/static_cast.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/static_cast.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/static_cast.C22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/static_cast.C b/gcc/testsuite/g++.old-deja/g++.pt/static_cast.C
new file mode 100644
index 000000000..89e794ab7
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/static_cast.C
@@ -0,0 +1,22 @@
+// { dg-do assemble }
+
+template <class InputIterator, class BinaryOperation>
+void accumulate(InputIterator first,
+ BinaryOperation binary_op) {
+}
+
+
+template<class R> int p( int val, R& r )
+{
+ return val + r;
+}
+
+template<class R> void f(R)
+{
+ accumulate(0, static_cast<int (*)(int, R&)>(p) );
+}
+
+int main()
+{
+ f(0);
+}