aboutsummaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2004-10-19 12:15:31 -0700
committerRichard Henderson <rth@gcc.gnu.org>2004-10-19 12:15:31 -0700
commite4ca3dc393298aebbf839437bde76a7e8c5afaef (patch)
tree120874cab702e913711f046a33141bc1abbf8736 /gcc/stor-layout.c
parente5fa845c7b10e8411acc0e5609a23c02633fde47 (diff)
downloadgcc-e4ca3dc393298aebbf839437bde76a7e8c5afaef.zip
gcc-e4ca3dc393298aebbf839437bde76a7e8c5afaef.tar.gz
gcc-e4ca3dc393298aebbf839437bde76a7e8c5afaef.tar.bz2
re PR target/17962 (small fp vector uses sse/mmx vectors and is not aligned)
PR 17962 * stor-layout.c (layout_type): Set TYPE_ALIGN for vectors. From-SVN: r89284
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r--gcc/stor-layout.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index c86dd54..10496b8 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -1576,6 +1576,10 @@ layout_type (tree type)
nunits_tree, 0);
TYPE_SIZE (type) = int_const_binop (MULT_EXPR, TYPE_SIZE (innertype),
nunits_tree, 0);
+
+ /* Always natually align vectors. This prevents ABI changes
+ depending on whether or not native vector modes are supported. */
+ TYPE_ALIGN (type) = tree_low_cst (TYPE_SIZE (type), 0);
break;
}