PR c++/80370
commit78cecf8ee4fa046e6c0808b4c43cd4901a0e0a98
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 11 Apr 2017 20:51:16 +0000 (11 20:51 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 11 Apr 2017 20:51:16 +0000 (11 20:51 +0000)
treef9b49b57950c4f011bc831074c00c11202b49c5a
parentba100e345ae840947fd2fcc438586feb118d2e8a
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@246857 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1z/decomp28.C [new file with mode: 0644]