[Bug c++/65211] [9/10 Regression] Type alignment lost inside templated function

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri May 13 17:14:16 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65211

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:

https://gcc.gnu.org/g:4b0c04f6b1c96f9baa7620c152b28e723212f955

commit r10-10738-g4b0c04f6b1c96f9baa7620c152b28e723212f955
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