https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97900
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:23be03a0f243a084a0fe03d0b96a3d045e1a2b65 commit r11-7965-g23be03a0f243a084a0fe03d0b96a3d045e1a2b65 Author: Jason Merrill <ja...@redhat.com> Date: Fri Apr 2 14:49:15 2021 -0400 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.