c++: Fix consteval operator handling.
authorJason Merrill <jason@redhat.com>
Tue, 16 Jun 2020 04:19:53 +0000 (00:19 -0400)
committerJason Merrill <jason@redhat.com>
Wed, 17 Jun 2020 19:08:42 +0000 (15:08 -0400)
commit14c831f5ef614aabb6a8c85712fb166600e6cc05
tree77518af0424598f7533f1eff7f30a44bae69c995
parentda2c9054f1596b71e3c81efd62b6cef348e445b4
c++: Fix consteval operator handling.

We were crashing trying to find the CALL_EXPR in the result of a call to a
consteval operator.

gcc/cp/ChangeLog:

* call.c (build_new_op_1): Don't look for a CALL_EXPR when
calling a consteval function.

gcc/testsuite/ChangeLog:

* g++.dg/cpp2a/consteval17.C: New test.
gcc/cp/call.c
gcc/testsuite/g++.dg/cpp2a/consteval17.C [new file with mode: 0644]