This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


> 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.

Could a global maintainer take a look at this?
http://gcc.gnu.org/ml/gcc-patches/2004-11/msg01459.html

Maybe Jason, since you already toyed with the stor-layout.c code.

This is an annoying regression for the 3.4 and 4.0 Ada compilers on 
STRICT_ALIGNMENT targets.

Thanks in advance.

-- 
Eric Botcazou


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]