[Bug c++/93822] [8/9/10/11 Regression] ICE in make_ssa_name_fn, at tree-ssanames.c:279 since r7-536-g381cdae49785fc4b
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon May 25 22:45:47 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93822
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:
https://gcc.gnu.org/g:487f16a7f2a6f849497a0d2f8fff61225e2270f6
commit r8-10272-g487f16a7f2a6f849497a0d2f8fff61225e2270f6
Author: Jason Merrill <jason@redhat.com>
Date: Mon May 25 18:38:09 2020 -0400
c++: generic lambda and -fsanitize=vla-bound [PR93822]
Within the generic lambda the VLA capture proxy VAR_DECL has
DECL_VALUE_EXPR
which is a NOP_EXPR to the VLA type of the proxy. The problem here was
that
when instantiating we were tsubsting that type twice, once for the type of
the DECL and once for the type of the NOP_EXPR, and getting two
different (though equivalent) types. Then gimplify_type_sizes fixed up the
type of the DECL, but that didn't affect the type of the NOP_EXPR, leading
to sadness.
Fixed by directly reusing the type from the DECL.
gcc/cp/ChangeLog
2020-05-01 Jason Merrill <jason@redhat.com>
PR c++/93822
* pt.c (tsubst_decl): Make sure DECL_VALUE_EXPR continues to have
the same type as the variable.
More information about the Gcc-bugs
mailing list