[gcc/devel/c++-modules] c++: Fix rejects-valid bug in cxx_eval_outermost_constant_expr [PR93905]
Nathan Sidwell
nathan@gcc.gnu.org
Fri Feb 28 13:28:00 GMT 2020
https://gcc.gnu.org/g:5de338f001eb2a821f40e599bd55119d43e0ae7e
commit 5de338f001eb2a821f40e599bd55119d43e0ae7e
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Feb 26 09:04:44 2020 +0100
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 <jakub@redhat.com>
PR c++/93905
* g++.dg/cpp0x/pr93905.C: New test.
Diff:
---
gcc/testsuite/ChangeLog | 5 +++++
gcc/testsuite/g++.dg/cpp0x/pr93905.C | 18 ++++++++++++++++++
2 files changed, 23 insertions(+)
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index f344376..217c360 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2020-02-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/93905
+ * g++.dg/cpp0x/pr93905.C: New test.
+
2020-02-25 Mihail Ionescu <mihail.ionescu@arm.com>
* 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 0000000..81c6266
--- /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{};
+}
More information about the Gcc-cvs
mailing list