From: Jan Hubicka Date: Tue, 6 Nov 2018 13:53:22 +0000 (+0100) Subject: tree.c (fld_type_variant): Also copy alignment; be sure that new variant is equal. X-Git-Tag: basepoints/gcc-10~3281 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f8d69798fd096ab6fca98ab189f31b31cb004502;p=thirdparty%2Fgcc.git tree.c (fld_type_variant): Also copy alignment; be sure that new variant is equal. * tree.c (fld_type_variant): Also copy alignment; be sure that new variant is equal. From-SVN: r265845 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index eb09970615b6..8dd1470ad5de 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-11-06 Jan Hubicka + + * tree.c (fld_type_variant): Also copy alignment; be sure that + new variant is equal. + 2018-11-06 Ilya Leoshkevich PR target/87762 diff --git a/gcc/tree.c b/gcc/tree.c index a6b187c07b4c..94a7c9ca6c69 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -5119,6 +5119,8 @@ fld_type_variant (tree first, tree t, struct free_lang_data_d *fld) TYPE_NAME (v) = TYPE_NAME (t); TYPE_ATTRIBUTES (v) = TYPE_ATTRIBUTES (t); TYPE_CANONICAL (v) = TYPE_CANONICAL (t); + SET_TYPE_ALIGN (v, TYPE_ALIGN (t)); + gcc_checking_assert (fld_type_variant_equal_p (t,v)); add_tree_to_fld_list (v, fld); return v; }