[Ada] Fix old glitch in record layout

Eric Botcazou ebotcazou@adacore.com
Sun Jan 11 12:29:00 GMT 2009


The attached patch fixes an old glitch in the layout of tagged discriminated 
record subtypes: the _tag field at offset 0 may not appear first in the field 
list.  This was apparently harmless for long but now runs afoul of structural 
alias analysis on the 4.3 branch (this analysis was not enabled for Ada up to 
and including 4.2).

Tested on i586-suse-linux, applied on the mainline and 4.3 branch.


2009-01-11  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Put
	the _Tag field before any discriminants in the field list.
	(components_to_record): Remove obsolete comment.


-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-diff
Size: 1420 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090111/ea083ba9/attachment.bin>


More information about the Gcc-patches mailing list