]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: C++23 range-for temps and ?: [PR119073]
authorJason Merrill <jason@redhat.com>
Tue, 4 Mar 2025 21:36:47 +0000 (16:36 -0500)
committerJason Merrill <jason@redhat.com>
Tue, 4 Mar 2025 23:18:39 +0000 (18:18 -0500)
commitf2a7f845698bfb7aaded9ffacd7046ae25a8b1fc
tree5d52190bb126f83c047eb9634708f266907983ed
parent8d7762945bba3c8321b5856cee3d5e5aed55facf
c++: C++23 range-for temps and ?: [PR119073]

Here gimplification got confused because extend_temps_r messed up the types
of the arms of a COND_EXPR.

PR c++/119073

gcc/cp/ChangeLog:

* call.cc (extend_temps_r): Preserve types of COND_EXPR arms.

gcc/testsuite/ChangeLog:

* g++.dg/cpp0x/range-for39.C: New test.
gcc/cp/call.cc
gcc/testsuite/g++.dg/cpp0x/range-for39.C [new file with mode: 0644]