re PR middle-end/81812 (Empty virtual function fails to compile)
authorPaolo Carlini <paolo.carlini@oracle.com>
Fri, 2 Mar 2018 18:06:44 +0000 (18:06 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 2 Mar 2018 18:06:44 +0000 (18:06 +0000)
2018-03-02  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/81812
* g++.dg/torture/pr81812.C: New.

From-SVN: r258150

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/torture/pr81812.C [new file with mode: 0644]

index 670d388b88459247f79411a5ce2eb5535eaaed4e..59631e92a9cd3ad78f2e9d8de18d28fee902b4d8 100644 (file)
@@ -1,3 +1,8 @@
+2018-03-02  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/81812
+       * g++.dg/torture/pr81812.C: New.
+
 2018-03-02  Marek Polacek  <polacek@redhat.com>
 
        PR c++/84171
diff --git a/gcc/testsuite/g++.dg/torture/pr81812.C b/gcc/testsuite/g++.dg/torture/pr81812.C
new file mode 100644 (file)
index 0000000..d235e23
--- /dev/null
@@ -0,0 +1,16 @@
+struct Error {
+  virtual void error(... ) const;
+};
+
+struct ChildNode : virtual Error {
+  void error(... ) const;
+};
+
+void ext(const char*, ...);
+
+void ChildNode::error(...) const
+{
+#ifdef FIX
+  ext("");
+#endif
+}