diff options
author | Richard Guenther <rguenther@suse.de> | 2009-05-24 16:12:58 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2009-05-24 16:12:58 +0000 |
commit | b842d478094ed4421934cbbd0f055fe6ca84fccd (patch) | |
tree | d7ba0a66a7255af61fd887cdac190657c5a2de6c /gcc/tree.c | |
parent | 2e6a3c8daff4e38d7b2fabbf46dbcf1740a59c06 (diff) | |
download | gcc-b842d478094ed4421934cbbd0f055fe6ca84fccd.tar.gz |
re PR tree-optimization/40233 (Test failures with "alignment of array elements is greater than element size")
2009-05-24 Richard Guenther <rguenther@suse.de>
PR middle-end/40233
* tree.c (make_vector_type): Build the TYPE_DEBUG_REPRESENTATION_TYPEs
array type from the main variant of the inner type.
* gcc.c-torture/compile/pr40233.c: New testcase.
From-SVN: r147835
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree.c b/gcc/tree.c index f0e861cb5cd..ddfa0a43258 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -7446,7 +7446,8 @@ make_vector_type (tree innertype, int nunits, enum machine_mode mode) { tree index = build_int_cst (NULL_TREE, nunits - 1); - tree array = build_array_type (innertype, build_index_type (index)); + tree array = build_array_type (TYPE_MAIN_VARIANT (innertype), + build_index_type (index)); tree rt = make_node (RECORD_TYPE); TYPE_FIELDS (rt) = build_decl (FIELD_DECL, get_identifier ("f"), array); |