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; +};