From: mpolacek Date: Thu, 10 Dec 2015 15:45:49 +0000 (+0000) Subject: PR c++/68348 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=30ccaf3a8f7c421e17ca5f73a4f9c7cfc818f222;p=thirdparty%2Fgcc.git PR c++/68348 * g++.dg/cpp0x/pr68348.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231524 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 98ecdb5f3c8c..ce44fa30a9f3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-12-10 Marek Polacek + + PR c++/68348 + * g++.dg/cpp0x/pr68348.C: New test. + 2015-12-10 Eric Botcazou * gnat.dg/specs/elab4.ads: New test. diff --git a/gcc/testsuite/g++.dg/cpp0x/pr68348.C b/gcc/testsuite/g++.dg/cpp0x/pr68348.C new file mode 100644 index 000000000000..9033bba23a2d --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/pr68348.C @@ -0,0 +1,18 @@ +// PR c++/68348 +// { dg-do compile { target c++11 } } + +struct C { + constexpr C() : w(), x(), y() {} + constexpr double fn() const noexcept; + double w; + double x; + double y; +}; + +constexpr double C::fn() const noexcept { return w; } +C foo() +{ + C c; + c.fn (); + return c; +}