https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95675
--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-9 branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:e90b052caf74dcc7529e6b2cc0b0688eebf53c74 commit r9-9264-ge90b052caf74dcc7529e6b2cc0b0688eebf53c74 Author: Jason Merrill <ja...@redhat.com> Date: Tue Mar 2 23:59:00 2021 -0500 c++: C++17 and decltype of multi-operator expression [PR95675] A call that is the immediate operand of decltype has special semantics: no temporary is produced, so it's OK for the return type to be e.g. incomplete. But we were treating (e | f) the same way, which confused overload resolution when we then tried to evaluate ... | g. Fixed by making build_temp do what its name says, and force the C++17 temporary materialization conversion. gcc/cp/ChangeLog: PR c++/95675 * call.c (build_temp): Wrap a CALL_EXPR in a TARGET_EXPR if it didn't get one before. gcc/testsuite/ChangeLog: PR c++/95675 * g++.dg/cpp0x/decltype-call5.C: New test. * g++.dg/cpp0x/decltype-call6.C: New test.