summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2013-12-05 18:07:08 +0000
committerjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2013-12-05 18:07:08 +0000
commit178e1d9947431e09eee09a3ef8a0f1fe545313ef (patch)
tree1fdbd33ff1c15f9fbf9180467dbbc1dafa0fefba
parent457e2f498d5d14836125315ddf51b24e985542cc (diff)
downloadgcc-178e1d9947431e09eee09a3ef8a0f1fe545313ef.tar.gz
2013-12-05 Martin Jambor <mjambor@suse.cz>
PR ipa/58253 * ipa-prop.c (ipa_modify_formal_parameters): Create decls of non-BLKmode in their naturally aligned type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205715 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/ipa-prop.c10
2 files changed, 15 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 55757a06caf..d4a52ee3d96 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2013-12-05 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/58253
+ * ipa-prop.c (ipa_modify_formal_parameters): Create decls of
+ non-BLKmode in their naturally aligned type.
+
2013-12-05 Marek Polacek <polacek@redhat.com>
PR sanitizer/59333
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index 712dab76c50..83dc53e9344 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -3444,7 +3444,15 @@ ipa_modify_formal_parameters (tree fndecl, ipa_parm_adjustment_vec adjustments)
if (adj->by_ref)
ptype = build_pointer_type (adj->type);
else
- ptype = adj->type;
+ {
+ ptype = adj->type;
+ if (is_gimple_reg_type (ptype))
+ {
+ unsigned malign = GET_MODE_ALIGNMENT (TYPE_MODE (ptype));
+ if (TYPE_ALIGN (ptype) < malign)
+ ptype = build_aligned_type (ptype, malign);
+ }
+ }
if (care_for_types)
new_arg_types = tree_cons (NULL_TREE, ptype, new_arg_types);