summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/call1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/template/call1.C')
-rw-r--r--gcc/testsuite/g++.dg/template/call1.C17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/call1.C b/gcc/testsuite/g++.dg/template/call1.C
new file mode 100644
index 000000000..3b6e367af
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/call1.C
@@ -0,0 +1,17 @@
+//Origin: harinath@cs.umn.edu
+//PR c++/10804
+// G++ was not emiting the function foo.
+
+// { dg-do run }
+
+
+template<class T>
+struct A
+{
+ A() { const void (*a)() = foo; }
+ static const void foo() {}
+};
+int main(int argc, char *argv[])
+{
+ A<int> a;
+}