aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Evans <dje@gnu.org>1997-01-21 18:21:05 +0000
committerDoug Evans <dje@gnu.org>1997-01-21 18:21:05 +0000
commitb5fa331476504dc8f16a009832fbf555bd3fc0e9 (patch)
treea8c1a6a01b6f622712ee393616f2c3d427147dde
parenta12f68f4f21713eab33d5adb8c538d1e3a822464 (diff)
downloadgcc-b5fa331476504dc8f16a009832fbf555bd3fc0e9.zip
gcc-b5fa331476504dc8f16a009832fbf555bd3fc0e9.tar.gz
gcc-b5fa331476504dc8f16a009832fbf555bd3fc0e9.tar.bz2
stor-layout.c (layout_record): Correct test for whether field spans its unit of alignment in case where...
* stor-layout.c (layout_record): Correct test for whether field spans its unit of alignment in case where field_size == type_align. From-SVN: r13540
-rw-r--r--gcc/stor-layout.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index e7af7d2..e014e47 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -445,7 +445,7 @@ layout_record (rec)
That can happen because the width exceeds BIGGEST_ALIGNMENT
or because it exceeds maximum_field_alignment. */
if (const_size / type_align
- != (const_size + (field_size % type_align) - 1) / type_align)
+ != (const_size + MIN (field_size, type_align) - 1) / type_align)
const_size = CEIL (const_size, type_align) * type_align;
}
#endif