diff options
author | DJ Delorie <dj@redhat.com> | 2000-12-07 20:10:40 -0500 |
---|---|---|
committer | DJ Delorie <dj@gcc.gnu.org> | 2000-12-07 20:10:40 -0500 |
commit | 54d7f9aa04cdeb3676cd614d0d80aaab5e492b19 (patch) | |
tree | ee1135791694b818e99a4db9289fb784e53dd06c /gcc | |
parent | 5133d90e9e844e9f7f349d1209008b1ad3267052 (diff) | |
download | gcc-54d7f9aa04cdeb3676cd614d0d80aaab5e492b19.zip gcc-54d7f9aa04cdeb3676cd614d0d80aaab5e492b19.tar.gz gcc-54d7f9aa04cdeb3676cd614d0d80aaab5e492b19.tar.bz2 |
c-decl.c (grokdeclarator): preserve previous alignments when rebuilding array types.
* c-decl.c (grokdeclarator): preserve previous alignments when
rebuilding array types.
From-SVN: r38122
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/c-decl.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 407baf1..b569533 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-12-07 DJ Delorie <dj@redhat.com> + + * c-decl.c (grokdeclarator): preserve previous alignments when + rebuilding array types. + 2000-12-07 Neil Booth <neilb@earthling.net> * cppfiles.c (struct include_file): Move from cpphash.h. diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 4776cd6..f10f4b0 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -4902,9 +4902,11 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) /* Move type qualifiers down to element of an array. */ if (TREE_CODE (type) == ARRAY_TYPE && type_quals) { + int saved_align = TYPE_ALIGN(type); type = build_array_type (c_build_qualified_type (TREE_TYPE (type), type_quals), TYPE_DOMAIN (type)); + TYPE_ALIGN (type) = saved_align; #if 0 /* Leave the variable const or volatile as well. */ type_quals = TYPE_UNQUALIFIED; #endif |