c++: dependent attribute on parameter [PR97900]
authorJason Merrill <jason@redhat.com>
Fri, 2 Apr 2021 18:49:15 +0000 (14:49 -0400)
committerJason Merrill <jason@redhat.com>
Sat, 3 Apr 2021 05:54:03 +0000 (01:54 -0400)
commit23be03a0f243a084a0fe03d0b96a3d045e1a2b65
tree3da73ac6f1e7c53f9cf75a1852453ffe966db3b8
parentb7c1f3d66cfc171bc4e779068530101fb2f197f1
c++: dependent attribute on parameter [PR97900]

We were copying attributes from the template to the instantiation without
considering that they might be dependent.  To make sure that the new parms
have the appropriate properties for the code pattern, let's just regenerate
them.

gcc/cp/ChangeLog:

PR c++/97900
* pt.c (regenerate_decl_from_template): tsubst_decl
the parms.

gcc/testsuite/ChangeLog:

PR c++/97900
* g++.dg/ext/vector40.C: New test.
gcc/cp/pt.c
gcc/testsuite/g++.dg/ext/vector40.C [new file with mode: 0644]