From: Jakub Jelinek Date: Wed, 26 Feb 2020 08:04:44 +0000 (+0100) Subject: c++: Fix rejects-valid bug in cxx_eval_outermost_constant_expr [PR93905] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5de338f001eb2a821f40e599bd55119d43e0ae7e;p=gcc.git c++: Fix rejects-valid bug in cxx_eval_outermost_constant_expr [PR93905] Add testcase for a bug that has been just on the 8 branch. 2020-02-26 Jakub Jelinek PR c++/93905 * g++.dg/cpp0x/pr93905.C: New test. --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f3443764196..217c3600b1b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-02-26 Jakub Jelinek + + PR c++/93905 + * g++.dg/cpp0x/pr93905.C: New test. + 2020-02-25 Mihail Ionescu * gcc.target/aarch64/advsimd-intrinsics/bf16_vstn.c: New test. diff --git a/gcc/testsuite/g++.dg/cpp0x/pr93905.C b/gcc/testsuite/g++.dg/cpp0x/pr93905.C new file mode 100644 index 00000000000..81c6266a795 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/pr93905.C @@ -0,0 +1,18 @@ +// PR c++/93905 +// { dg-do compile { target c++11 } } + +enum class E { VALUE }; + +struct B { + E e{E::VALUE}; +protected: + ~B () = default; +}; + +struct D : B {}; + +int +main () +{ + D d{}; +}