[Bug c++/125759] [reflection] ICE on reflection of reference pack
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jun 17 15:47:01 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125759
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>:
https://gcc.gnu.org/g:d1c12591336de2358c7da4a45855ddac2e02edda
commit r17-1628-gd1c12591336de2358c7da4a45855ddac2e02edda
Author: Marek Polacek <polacek@redhat.com>
Date: Fri Jun 12 11:44:15 2026 -0400
c++/reflection: ICE in get_reflection on INDIRECT_REF [PR125759]
We crash here in outer_var_p on:
/* These should have been stripped or otherwise handled by the caller.
*/
gcc_checking_assert (!REFERENCE_REF_P (decl));
because we never stripped the INDIRECT_REF in get_reflection. I don't
think stripping it only for the outer_automatic_var_p call would be
right so I'm doing it at the top of the function.
PR c++/125759
gcc/cp/ChangeLog:
* reflect.cc (get_reflection): Do STRIP_REFERENCE_REF.
gcc/testsuite/ChangeLog:
* g++.dg/reflect/expr17.C: New test.
Reviewed-by: Patrick Palka <ppalka@redhat.com>
More information about the Gcc-bugs
mailing list