[Bug c++/124204] [reflection] Internal compiler error when using std::meta::substitute with a reference reflection: in implicit_conversion, at cp/call.cc:2237
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Feb 26 19:33:01 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124204
--- Comment #2 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:195e27c797b695f16032dead8d475eca097ebe5c
commit r16-7744-g195e27c797b695f16032dead8d475eca097ebe5c
Author: Marek Polacek <polacek@redhat.com>
Date: Tue Feb 24 11:08:55 2026 -0500
c++/reflection: fix crash with substitute [PR124204]
Here we crash in implicit_conversion on:
/* An argument should have gone through convert_from_reference. */
gcc_checking_assert (!expr || !TYPE_REF_P (from));
so let's do that.
PR c++/124204
gcc/cp/ChangeLog:
* reflect.cc (eval_can_substitute): Call convert_from_reference.
gcc/testsuite/ChangeLog:
* g++.dg/reflect/substitute5.C: New test.
Reviewed-by: Jason Merrill <jason@redhat.com>
More information about the Gcc-bugs
mailing list