[patch] fix PR 27948

Roger Sayle roger@eyesopen.com
Fri Jun 9 15:21:00 GMT 2006


Hi Eric,

On Fri, 9 Jun 2006, Eric Christopher wrote:
> 2006-06-09  Eric Christopher  <echristo@apple.com>
>
> 	* config/stor-layout.c (place_field): Remove check for
> 	remaining_in_alignment when aligning at the end of
> 	a run.
>
> 2006-06-09  Eric Christopher  <echristo@apple.com>
>
> 	* gcc.dg/bf-no-ms-layout.c: Enable for i?86-darwin.
> 	* gcc.dg/bf-ms-layout.c: Ditto. Use attribute instead of
> 	command line option.
> 	* gcc.dg/attr-ms_struct-2.c: New.

This is OK for mainline, with three changes.  The first is there's
a typo in your bf-no-ms-layout.c change:

-/* { dg-do run { target *-*-interix* *-*-mingw* *-*-cygwin* } } */
+/* { dg-do run { target *-*-interix* *-*-mingw* *-*-cygwin* i?86-*-cygwin } } */

I believe you intended the final "cygwin" to be "darwin".

The next two follow-on from Danny Smith's suggestions.  Instead of
changing bf-ms-layout.c from testing the -mms-bitfields command
line option, you should duplicate the testcase, where one copy
of the test checks the command line option is functional, and the
other copy tests the #pragma is functional.  I'm not sure its
worth the effort to avoid duplication by #including a common file,
but if you can, that would be great.

Finally, although not as important once the test is duplicated,
it sounded like a good idea to surround the #define ATTR with an
#ifdef __GNUC__ to allow the results to be compared with the other
compilers that support MS-style packing.

Ok for mainline with those changes.

Roger
--



More information about the Gcc-patches mailing list