[Bug c++/65211] [9/10/11/12 Regression] Type alignment lost inside templated function
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Apr 14 02:56:39 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65211
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:
https://gcc.gnu.org/g:8369b4e4c6433535981d377edc1d4abb799c9225
commit r12-8153-g8369b4e4c6433535981d377edc1d4abb799c9225
Author: Jason Merrill <jason@redhat.com>
Date: Wed Apr 13 21:56:03 2022 -0400
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.cc (tsubst_decl) [TYPE_DECL]: Copy TYPE_ALIGN.
gcc/testsuite/ChangeLog:
* g++.target/i386/vec-tmpl1.C: New test.
More information about the Gcc-bugs
mailing list