From: DJ Delorie Date: Fri, 8 Dec 2000 01:10:40 +0000 (-0500) Subject: c-decl.c (grokdeclarator): preserve previous alignments when rebuilding array types. X-Git-Tag: prereleases/libstdc++-2.92~2376 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=54d7f9aa04cdeb3676cd614d0d80aaab5e492b19;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 407baf1ed030..b569533e7b38 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-12-07 DJ Delorie + + * c-decl.c (grokdeclarator): preserve previous alignments when + rebuilding array types. + 2000-12-07 Neil Booth * cppfiles.c (struct include_file): Move from cpphash.h. diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 4776cd693d0b..f10f4b02b6a2 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