From: Richard Biener Date: Tue, 31 Mar 2015 13:32:59 +0000 (+0000) Subject: tree-sra.c (create_access_replacement): Drop under-/over-alignment of types. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=78f1b5234a80f335b60b8687d1d6705aa262ea99;p=gcc.git tree-sra.c (create_access_replacement): Drop under-/over-alignment of types. 2015-03-31 Richard Biener * tree-sra.c (create_access_replacement): Drop under-/over-alignment of types. From-SVN: r221795 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 72389ee4e7a..e37abf98162 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-03-31 Richard Biener + + * tree-sra.c (create_access_replacement): Drop under-/over-alignment + of types. + 2015-03-31 Dominik Vogt * config/s390/s390.c (s390_function_num_hotpatch_hw): Allow hotpatching diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index 91b72fbdc89..6adee70bce5 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -2012,7 +2012,11 @@ create_access_replacement (struct access *access) DECL_CONTEXT (repl) = current_function_decl; } else - repl = create_tmp_var (access->type, "SR"); + /* Drop any special alignment on the type if it's not on the main + variant. This avoids issues with weirdo ABIs like AAPCS. */ + repl = create_tmp_var (build_qualified_type + (TYPE_MAIN_VARIANT (access->type), + TYPE_QUALS (access->type)), "SR"); if (TREE_CODE (access->type) == COMPLEX_TYPE || TREE_CODE (access->type) == VECTOR_TYPE) {