aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/ext/instantiate3.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/ext/instantiate3.C')
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/ext/instantiate3.C14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/ext/instantiate3.C b/gcc-4.9/gcc/testsuite/g++.dg/ext/instantiate3.C
new file mode 100644
index 000000000..ea60d5bf9
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/ext/instantiate3.C
@@ -0,0 +1,14 @@
+// Test that 'inline template' instantiates the vtable.
+// { dg-do compile }
+// { dg-options "-O -fno-implicit-templates" }
+
+template <class T> struct A {
+ virtual void f () { }
+};
+inline template struct A<int>;
+
+// { dg-final { scan-assembler "\n_?_ZTV1AIiE(:|\n|\t)" } }
+A<int> a;
+
+// { dg-final { scan-assembler-not "\n_?_ZTV1AIcE(:|\n|\t)" } }
+A<char> b;