https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123261
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Yuao Ma <[email protected]>: https://gcc.gnu.org/g:94010a2af914ade3cfd791ac72c25df79efe299b commit r16-6334-g94010a2af914ade3cfd791ac72c25df79efe299b Author: Yuao Ma <[email protected]> Date: Tue Dec 23 00:40:54 2025 +0800 c++: fix function body cloning when using implicit constexpr When using implicit constexpr, we should not discard the function body, as it can result in ICE during constant evaluation. PR c++/123261 gcc/cp/ChangeLog: * semantics.cc (expand_or_defer_fn_1): Use maybe_constexpr_fn. gcc/testsuite/ChangeLog: * g++.dg/ext/fimplicit-constexpr2.C: New test.
