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]

[Ada] Wrong size for variant records with single variant with front-end layout


When front-end layout is enabled (such as for non-GCC targets like AAMP),
the RM_Size value of variant records with a static-sized single variant is
computed incorrectly as storage units rather than bits (which can cause
incorrect code for reading and writing objects). This case is now tested for
and RM_Size is properly determined as a bit size.

Tested on x86_64-pc-linux-gnu, committed on trunk

2012-04-26  Gary Dismukes  <dismukes@adacore.com>

	* layout.adb (Layout_Component_List): Test for the case of a
	single variant and the size of its component list was computed
	as an integer literal, and use that size (which is in bits)
	as is rather than converting to storage units.

Attachment: difs
Description: Text document


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