diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-02-26 09:59:12 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-02-26 09:59:12 +0000 |
commit | 50c96f178b57359c2e9ee61fb7a3710328e05def (patch) | |
tree | 32a84c63a5a68adef879c2b408c89347cf365232 /gcc/tree-vect-stmts.c | |
parent | fb085a7dfcf600a4378f9121903108e6bfc6ede7 (diff) | |
download | gcc-50c96f178b57359c2e9ee61fb7a3710328e05def.tar.gz |
PR tree-optimization/56443
* tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): For
overaligned types, pass TYPE_UNSIGNED (scalar_type) as second argument
to type_for_mode langhook.
* gcc.dg/torture/pr56443.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196277 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-stmts.c')
-rw-r--r-- | gcc/tree-vect-stmts.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 1712d950e60..37f24234a9c 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -6071,7 +6071,8 @@ get_vectype_for_scalar_type_and_size (tree scalar_type, unsigned size) /* We can't build a vector type of elements with alignment bigger than their size. */ else if (nbytes < TYPE_ALIGN_UNIT (scalar_type)) - scalar_type = lang_hooks.types.type_for_mode (inner_mode, 1); + scalar_type = lang_hooks.types.type_for_mode (inner_mode, + TYPE_UNSIGNED (scalar_type)); /* If we felt back to using the mode fail if there was no scalar type for it. */ |