diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-03-31 13:32:59 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-03-31 13:32:59 +0000 |
commit | c75febdbc7d50b94f59cb5749d604ce5228cd2e8 (patch) | |
tree | efacf95b9b4bef0d10521890c23716f2a62224b0 /gcc/tree-sra.c | |
parent | 068772324351dc31aa8970896bee4041172b8a47 (diff) | |
download | gcc-c75febdbc7d50b94f59cb5749d604ce5228cd2e8.tar.gz |
2015-03-31 Richard Biener <rguenther@suse.de>
* tree-sra.c (create_access_replacement): Drop under-/over-alignment
of types.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221795 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r-- | gcc/tree-sra.c | 6 |
1 files changed, 5 insertions, 1 deletions
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) { |