From c660f88b1651c331273d636df9fd4eb191dfd46f Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Fri, 2 Mar 2018 18:06:44 +0000 Subject: [PATCH] re PR middle-end/81812 (Empty virtual function fails to compile) 2018-03-02 Paolo Carlini PR c++/81812 * g++.dg/torture/pr81812.C: New. From-SVN: r258150 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/torture/pr81812.C | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 gcc/testsuite/g++.dg/torture/pr81812.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 670d388..59631e9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-03-02 Paolo Carlini + + PR c++/81812 + * g++.dg/torture/pr81812.C: New. + 2018-03-02 Marek Polacek 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 index 0000000..d235e23 --- /dev/null +++ b/gcc/testsuite/g++.dg/torture/pr81812.C @@ -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 +} -- 2.7.4