diff options
author | Jakub Jelinek <jakub@redhat.com> | 2019-12-21 00:19:23 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-12-21 00:19:23 +0100 |
commit | b804bd89d3a8ff3ab6b916d2982b83f805cc6256 (patch) | |
tree | 8a1097c4821acbaa53300ecce02b6a2f911f4b32 /gcc/cp/method.c | |
parent | 8aca5ebe07efd6d710c76eff2d3524f6c5c4ff2b (diff) | |
download | gcc-b804bd89d3a8ff3ab6b916d2982b83f805cc6256.zip gcc-b804bd89d3a8ff3ab6b916d2982b83f805cc6256.tar.gz gcc-b804bd89d3a8ff3ab6b916d2982b83f805cc6256.tar.bz2 |
re PR c++/92966 (Segfault on defaulted operator== with wrong return type)
PR c++/92966
* method.c (early_check_defaulted_comparison): Don't set
DECL_MAYBE_DELETED when returning false.
* g++.dg/cpp2a/spaceship-eq8.C: New test.
From-SVN: r279683
Diffstat (limited to 'gcc/cp/method.c')
-rw-r--r-- | gcc/cp/method.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/method.c b/gcc/cp/method.c index 248a0e5..69e1262 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -1153,7 +1153,7 @@ early_check_defaulted_comparison (tree fn) } /* We still need to deduce deleted/constexpr/noexcept and maybe return. */ - DECL_MAYBE_DELETED (fn) = true; + DECL_MAYBE_DELETED (fn) = ok; return ok; } |