]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: alignment of local typedef in template [PR65211]
authorJason Merrill <jason@redhat.com>
Thu, 14 Apr 2022 01:56:03 +0000 (21:56 -0400)
committerJason Merrill <jason@redhat.com>
Fri, 13 May 2022 17:39:31 +0000 (13:39 -0400)
commit2a9658132c449e48e1c3532190c8ab72f4bbe788
tree3eb71bad235eaa1098ed4fbf9a5f1936f017a857
parentde0b78d1e75e9483b4550abc38b9199c96465dc5
c++: alignment of local typedef in template [PR65211]

Because common_handle_aligned_attribute only applies the alignment to the
TREE_TYPE of a typedef, not the DECL_ORIGINAL_TYPE, we need to copy it
explicitly in tsubst.

PR c++/65211

gcc/cp/ChangeLog:

* pt.c (tsubst_decl) [TYPE_DECL]: Copy TYPE_ALIGN.

gcc/testsuite/ChangeLog:

* g++.target/i386/vec-tmpl1.C: New test.
gcc/cp/pt.c
gcc/testsuite/g++.target/i386/vec-tmpl1.C [new file with mode: 0644]