diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-12-14 17:05:43 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-12-14 17:05:43 +0000 |
commit | 038cd0e355f06b91eb170524e8acea674edaaa16 (patch) | |
tree | 9d8d76ec78b9ddac59b5e7f780d3062d1ec27069 /gcc/ada/gcc-interface/decl.c | |
parent | 6f0b1062224ee4035cc46735e3c0e388767d5899 (diff) |
* gcc-interface/decl.c (gnat_to_gnu_field): Do not set the alignment
of the enclosing record type if it is not already set.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@255646 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gcc-interface/decl.c')
-rw-r--r-- | gcc/ada/gcc-interface/decl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index 0031196e3bf2..e226f256b47f 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -7127,7 +7127,8 @@ gnat_to_gnu_field (Entity_Id gnat_field, tree gnu_record_type, int packed, { const unsigned int type_align = TYPE_ALIGN (gnu_field_type); - if (TYPE_ALIGN (gnu_record_type) < type_align) + if (TYPE_ALIGN (gnu_record_type) + && TYPE_ALIGN (gnu_record_type) < type_align) SET_TYPE_ALIGN (gnu_record_type, type_align); /* If the position is not a multiple of the alignment of the type, |