From: Richard Kenner Date: Sun, 4 May 2003 22:04:51 +0000 (+0000) Subject: stor-layout.c (compute_record_mode): Relax restriction on fields crossing word bounda... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ad26fb41b4bb380ae90a5a2ebd19e158410fad56;p=gcc.git stor-layout.c (compute_record_mode): Relax restriction on fields crossing word boundaries forcing BLKmode. * stor-layout.c (compute_record_mode): Relax restriction on fields crossing word boundaries forcing BLKmode. From-SVN: r66463 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bcd20e3e765..286b66a3413 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-05-04 Richard Kenner + + * stor-layout.c (compute_record_mode): Relax restriction + on fields crossing word boundaries forcing BLKmode. + 2003-05-04 Neil Booth * cppinit.c (cpp_create_reader, post_options): Warn about diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index f275e00d133..14f0f866b7f 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -1387,8 +1387,10 @@ compute_record_mode (type) if (bitpos / BITS_PER_WORD != ((tree_low_cst (DECL_SIZE (field), 1) + bitpos - 1) / BITS_PER_WORD) - /* But there is no problem if the field is entire words. */ - && tree_low_cst (DECL_SIZE (field), 1) % BITS_PER_WORD != 0) + /* But there is no problem if the field is entire words + or bigger than a word. */ + && ! (tree_low_cst (DECL_SIZE (field), 1) % BITS_PER_WORD == 0 + || compare_tree_int (DECL_SIZE (field), BITS_PER_WORD) > 0)) return; /* If this field is the whole struct, remember its mode so