On 09/12/15 15:38, Marek Polacek wrote:
This adds a testcase for the already fixed PR68348.
Tested on x86_64-linux, ok for trunk?
2015-12-09 Marek Polacek <pola...@redhat.com>
PR c++/68348
* g++.dg/cpp0x/pr68348.C: New test.
diff --git gcc/testsuite/g++.dg/cpp0x/pr68348.C
gcc/testsuite/g++.dg/cpp0x/pr68348.C
index e69de29..9033bba 100644
--- gcc/testsuite/g++.dg/cpp0x/pr68348.C
+++ 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;
+}
Marek
Same as:
https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01001.html
:)
Kyrill