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.
This commit is contained in:
Jakub Jelinek 2020-02-26 09:04:44 +01:00
parent 07a0e380d6
commit 5de338f001
2 changed files with 23 additions and 0 deletions

View File

@ -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.

View File

@ -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{};
}