]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
This commit was manufactured by cvs2svn to create branch
authorNo Author <no-author@gcc.gnu.org>
Thu, 1 Apr 2004 21:48:06 +0000 (21:48 +0000)
committerNo Author <no-author@gcc.gnu.org>
Thu, 1 Apr 2004 21:48:06 +0000 (21:48 +0000)
'gcc-3_3-branch'.

From-SVN: r80324

gcc/testsuite/g++.dg/init/static2.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/init/static2.C b/gcc/testsuite/g++.dg/init/static2.C
new file mode 100644 (file)
index 0000000..b0344f4
--- /dev/null
@@ -0,0 +1,25 @@
+// PR 14804
+// { dg-do run }
+
+struct A {
+  virtual void foo() = 0;
+};
+
+struct B : public A {
+  virtual void bar() = 0;
+};
+
+typedef void (A::*mfptr)();
+
+struct D {
+  mfptr p;
+};
+
+static const D ds[] = {
+  { reinterpret_cast<mfptr>(&B::bar) },
+};
+
+int main()
+{
+  return 0;
+}