https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125206
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-16 branch has been updated by Marek Polacek <[email protected]>: https://gcc.gnu.org/g:0aca4be8913d4aee1adda2e49e971afffdf03f61 commit r16-8879-g0aca4be8913d4aee1adda2e49e971afffdf03f61 Author: Marek Polacek <[email protected]> Date: Thu May 7 09:51:53 2026 -0400 c++/reflection: ICE with bases_of [PR125206] Here we crash in strip_typedefs_expr because we recurse on a REFLECT_EXPR with TREE_BINFO as its operand, which is not a code this function handles. It seems to me that we don't need to recurse for REFLECT_EXPRs at all. Alternatively, we could just handle TREE_BINFO. PR c++/125206 gcc/cp/ChangeLog: * tree.cc (strip_typedefs_expr) <case REFLECT_EXPR>: Always return instead of recursing. gcc/testsuite/ChangeLog: * g++.dg/reflect/bases_of4.C: New test. Reviewed-by: Jason Merrill <[email protected]> (cherry picked from commit 694d048d87457e7728b9b5484a9b97cb0e617e40)
