C++: add type checking for static local vector variable in template
authorwangpc <pc.wang@linux.alibaba.com>
Sat, 18 Sep 2021 05:53:09 +0000 (13:53 +0800)
committerJason Merrill <jason@redhat.com>
Tue, 21 Sep 2021 00:52:46 +0000 (20:52 -0400)
commit56c24f18cce0da6405c5071b838844447fa81ac8
tree16a11409e01b62870a1786052a8b4709f36d6078
parent624980241ec69afc7b354f81cc64a1fd77131f3e
C++: add type checking for static local vector variable in template

This patch moves verify_type_context from start_decl_1 to cp_finish_decl to
do more type checking such as static local vector variable in C++ template.

2021-08-06  wangpc  <pc.wang@linux.alibaba.com>

gcc/cp/ChangeLog

* decl.c (start_decl_1): Move verify_type_context to ...
(cp_finish_decl): ... to here.

gcc/testsuite/ChangeLog

* g++.target/aarch64/sve/static-var-in-template.C: New test.
gcc/cp/decl.c
gcc/testsuite/g++.target/aarch64/sve/static-var-in-template.C [new file with mode: 0644]