From 1b85e4b23b4a6dfbdb05c3a24ccb2e271d014981 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Tue, 18 Nov 2014 16:02:58 +0000 Subject: [PATCH] re PR c++/55942 ([C++11] sorry, unimplemented: calling a member function of the object being constructed in a constant expression) 2014-11-18 Paolo Carlini PR c++/55942 * g++.dg/cpp0x/constexpr-55942.C: New. From-SVN: r217719 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/constexpr-55942.C | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/constexpr-55942.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ca77cc0035d..840faa9914a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-11-18 Paolo Carlini + + PR c++/55942 + * g++.dg/cpp0x/constexpr-55942.C: New. + 2014-11-18 Marek Polacek PR sanitizer/63866 diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-55942.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-55942.C new file mode 100644 index 00000000000..81f2f34ff4a --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-55942.C @@ -0,0 +1,11 @@ +// PR c++/55942 +// { dg-do compile { target c++11 } } + +struct A +{ + constexpr explicit A(bool b) : o{flip(b)} { } + + constexpr bool flip(bool b) { return !b; } + + bool o; +}; -- 2.30.2