summaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/decl.c
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2018-01-15 13:20:50 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2018-01-15 13:20:50 +0000
commita1dc5f3f6808a90bd006dfd0918a418564dfe227 (patch)
treed83a5575075861c6aa0f61bc77c9358642b3942f /gcc/ada/gcc-interface/decl.c
parentf400b65dc33b04817230f953170aa853b43f93b9 (diff)
downloadgcc-a1dc5f3f6808a90bd006dfd0918a418564dfe227.tar.gz
Merge branches/gcc-6-branch rev 256699.
Change-Id: Ib35a6e2c663e57fd6c857b54fd4287bef5bddfa8
Diffstat (limited to 'gcc/ada/gcc-interface/decl.c')
-rw-r--r--gcc/ada/gcc-interface/decl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index 2e57beae2f5..a02dd24b27f 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -6805,7 +6805,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)
TYPE_ALIGN (gnu_record_type) = type_align;
/* If the position is not a multiple of the alignment of the type,