Danny Smith wrote:
Sorry, my time is currently taken up by some other work.Jim Wilson wrote http://gcc.gnu.org/ml/gcc/2005-04/msg01172.html
Joern RENNECKE wrote:allocated
required for Tal16bool. Should we enforce that any storage element
even when it exceedsfor a run of ms-bitfields get the full alignment of the basetype,
compilerthe size of the basetype and of BIGGEST_ALIGNMENT?Obviously, we should do the exact same thing that the microsoft
compiler,does. That is the whole point of -mms-bitfields.
If we can't generate an equivalent testcase for the microsoft
because it doesn't have aligned attributes or equivalent, then we cando
whatever seems to make sense.
I believe the MS equivalent is __declspec (align (16)). Could you test
the following patch to i386/cygming.h to see if you come closer to MS behaviour (I don't have a
MS compiler handy).
The background of my query was this: while doing regression the sh-elf-4_1 branch,
I found that some of the struct-layout superficial regressions were actually due to use of
unitialized memory in the ms-bitfield code, as reported before in PR middle-end/20371.
After applying the patch from December to the branch. I found some new regressions,
which led me to write an additional patch, which can be found in the PR as attachment
from the 15th April. This new patch contains an gcc_assert that checks that
actual_align >= type_align whenever storage for a new run of bitfields is allocated.
This assert triggered for a number of the struct-layout cases, which lead to my query.
I found that a run of bitfields was allocated to only 64 bit alignment, even though the
type said it should be 128 bit aligned (although baed on bool).
I don't have a cygwin test platform, I have been doing sh64-elf regression tests using the
simulator available in the contrib directory of gdb.