PR c++/92560 - ICE with decltype and rewritten operator.
authorJason Merrill <jason@redhat.com>
Tue, 10 Dec 2019 20:06:58 +0000 (15:06 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 10 Dec 2019 20:06:58 +0000 (15:06 -0500)
commit1fb81d83a8857770be56df19c8a3b4e0ca87c71c
treeda7f04f9668a4910c244b85aa5d318ca5fb9ff1f
parent42aed35797ad46c1c98fcddf6a29ecb45b45ea9d
PR c++/92560 - ICE with decltype and rewritten operator.

A call as the immediate operand of decltype is handled differently; we don't
create an object of the return type as we do normally.  But in the case of a
rewritten operator, we're adding another call as a wrapper, so the inner
call doesn't get the special handling.

* call.c (build_new_op_1): Clear tf_decltype on inner call.

From-SVN: r279183
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/testsuite/g++.dg/cpp2a/spaceship-decltype1.C [new file with mode: 0644]