[Bug c++/80370] [7 Regression] ICE when using structured bindings and nested generic lambdas (tsubst_decomp_names)
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Apr 11 20:51:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80370
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Tue Apr 11 20:51:16 2017
New Revision: 246857
URL: https://gcc.gnu.org/viewcvs?rev=246857&root=gcc&view=rev
Log:
PR c++/80370
* decl.c (cp_finish_decomp): If processing_template_decl on
non-dependent decl, only set TREE_TYPE on the v[i] decls, but don't
change their DECL_VALUE_EXPR nor cp_finish_decl them. Instead make
sure DECL_VALUE_EXPR is the canonical NULL type ARRAY_REF for tsubst
processing.
* pt.c (value_dependent_expression_p) <case VAR_DECL>: For variables
with DECL_VALUE_EXPR, return true if DECL_VALUE_EXPR is type
dependent.
* g++.dg/cpp1z/decomp28.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/cpp1z/decomp28.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list