[Bug c++/123529] [13/14 Regression] ICE in discriminator_for_local_entity, at cp/mangle.cc:2316 since r12-6075
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Jun 27 20:09:03 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123529
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Patrick Palka
<ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:040cf529e22c309c0f568823ba4fb1fab6de3d7e
commit r14-12704-g040cf529e22c309c0f568823ba4fb1fab6de3d7e
Author: Patrick Palka <ppalka@redhat.com>
Date: Tue Apr 7 12:28:42 2026 -0400
c++: templated static local var has value-dep addr, cont [PR123529]
has_value_dependent_address for a static local variable checks type
dependence of its context, but that's too narrow and we need a more
general dependence check that considers outer template arguments as
well, so that in the testcase below we deem A<T>::g()::i to have a
value-dependent address (making f<&i>() a dependent call).
PR c++/123529
PR c++/98930
gcc/cp/ChangeLog:
* pt.cc (has_value_dependent_address): Correct context
dependence check for a static local variable.
gcc/testsuite/ChangeLog:
* g++.dg/cpp1z/nontype9.C: New test.
Reviewed-by: Jason Merrill <jason@redhat.com>
(cherry picked from commit 6084b750085ae0de11b65df76b9e590b795afc74)
More information about the Gcc-bugs
mailing list