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 | |
parent | 2e6a3c8daff4e38d7b2fabbf46dbcf1740a59c06 (diff) | |
download | gcc-b842d478094ed4421934cbbd0f055fe6ca84fccd.zip gcc-b842d478094ed4421934cbbd0f055fe6ca84fccd.tar.gz gcc-b842d478094ed4421934cbbd0f055fe6ca84fccd.tar.bz2 |
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')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr40233.c | 10 | ||||
-rw-r--r-- | gcc/tree.c | 3 |
4 files changed, 23 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0fcaff6..8730f68 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +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. + 2009-05-24 Jan-Benedict Glaw <jbglaw@lug-owl.de> * config/vax/vax-protos.h (legitimate_constant_address_p): Change diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c066bc7..cbfaf21 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2009-05-24 Richard Guenther <rguenther@suse.de> + + PR middle-end/40233 + * gcc.c-torture/compile/pr40233.c: New testcase. + 2009-05-24 Uros Bizjak <ubizjak@gmail.com> * gfortran.dg/erf_2.F90 (dg-options): Add -mieee diff --git a/gcc/testsuite/gcc.c-torture/compile/pr40233.c b/gcc/testsuite/gcc.c-torture/compile/pr40233.c new file mode 100644 index 0000000..b3487ed --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr40233.c @@ -0,0 +1,10 @@ +typedef int aligned __attribute__((aligned(64))); +struct Frame { + aligned i; +}; + +void foo(struct Frame *p) +{ + aligned *q = &p->i; + *q = 0; +} @@ -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); |