[Bug c++/65211] [9/10/11 Regression] Type alignment lost inside templated function
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri May 13 16:28:15 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65211
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:
https://gcc.gnu.org/g:e60f7127b3282e0201a1bba8ff550dc3c3fdbe61
commit r11-9993-ge60f7127b3282e0201a1bba8ff550dc3c3fdbe61
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.c (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