[PATCH] Fix bug and pessimization for packed records in Ada

Eric Botcazou ebotcazou@act-europe.fr
Thu Nov 18 09:43:00 GMT 2004


> 2004-11-18  Eric Botcazou  <ebotcazou@act-europe.fr>
>
> 	* langhooks.h (can_promote_packed_bit_field_p): New.
> 	* langhooks.c (lhd_can_promote_packed_bit_field_p): New function.
> 	* langhooks-def.h (lhd_can_promote_packed_bit_field_p): Declare it.
> 	(LANG_HOOKS_CAN_PROMOTE_PACKED_BIT_FIELD_P): Define to it.
> 	(LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_CAN_PROMOTE_PACKED_BIT_FIELD_P.
> 	* stor-layout.c (layout_decl): Attempt to promote a bit-field only
> 	after the default alignment has been computed.  Do not promote it
> 	if the alignment was forced to the minimal one because of packedness,
> 	unless the language specifically allows it.
> 	(lang_adjust_rli): Remove.
> 	(set_lang_adjust_rli): Likewise.
> 	(layout_type): Remove invocation of set_lang_adjust_rli.
> 	* tree.h (set_lang_adjust_rli): Remove.
> 	* ada/misc.c (gnat_adjust_rli): Remove.
> 	(gnat_init): Remove invocation of set_lang_adjust_rli.
> 	(gnat_can_promote_packed_bit_field_p): New function.
> 	(LANG_HOOKS_CAN_PROMOTE_PACKED_BIT_FIELD_P): Set it
> 	to gnat_can_promote_packed_bit_field_p.

Err, the patch was not attached.

-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: b624-017-2_mainline.diff
Type: text/x-diff
Size: 10894 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20041118/d3cad762/attachment.bin>


More information about the Gcc-patches mailing list