Commit 0382a41d by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/86953 (compiler crashes with constexpr operator== and specific struct…

re PR c++/86953 (compiler crashes with constexpr operator== and specific struct (cxx_eval_bit_field_ref, at cp/constexpr.c:2704))

	PR c++/86953
	* g++.dg/cpp0x/constexpr-86953.C: New test.

From-SVN: r270396
parent 590df85d
2019-04-16 Jakub Jelinek <jakub@redhat.com>
PR c++/86953
* g++.dg/cpp0x/constexpr-86953.C: New test.
2019-04-16 Dominique d'Humieres <dominiq@gcc.gnu.org> 2019-04-16 Dominique d'Humieres <dominiq@gcc.gnu.org>
* g++.dg/lto/pr89358_0.C: Replace dg-* with dg-lto-*. * g++.dg/lto/pr89358_0.C: Replace dg-* with dg-lto-*.
......
// PR c++/86953
// { dg-do run { target c++11 } }
// { dg-options "-O2" }
struct B {
double x;
bool y, z;
constexpr bool operator== (const B& o) const noexcept
{
return x == o.x && y == o.y && z == o.z;
}
constexpr bool operator!= (const B& o) const noexcept { return !(*this == o); }
};
int
main ()
{
bool b = B{} == B{};
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment