https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120529
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-15 branch has been updated by Marek Polacek <[email protected]>: https://gcc.gnu.org/g:be07701934f75b112593f37d72cd8842ce969b79 commit r15-10541-gbe07701934f75b112593f37d72cd8842ce969b79 Author: Marek Polacek <[email protected]> Date: Thu Nov 20 13:57:43 2025 -0500 c++: make __reference_*_from_temporary honor access [PR120529] This PR reports that our __reference_*_from_temporary ignore access control. The reason is that we only check if implicit_conversion works, but not if the conversion can actually be performed, via convert_like. PR c++/120529 gcc/cp/ChangeLog: * call.cc (ref_conv_binds_to_temporary): Don't ignore access control. gcc/testsuite/ChangeLog: * g++.dg/ext/reference_xes_from_temporary1.C: New test. Reviewed-by: Jason Merrill <[email protected]> (cherry picked from commit e82a8e51848b5a74edb530f7597861f7080662c3)
