[Ada] Generate XVZ variable for constrained record subtype

Eric Botcazou ebotcazou@adacore.com
Fri Oct 2 20:31:00 GMT 2009

For a constrained record subtype, the compiler generates a special XVS type to 
help the debugger interpret the subtype.  If the constraints are not static, 
the size of the subtype isn't constant and the debugger may not be able to 
easily infer it from the XVS type.  This patch instructs the compiler to also 
generate a special XVZ variable in this case to hold the size of the subtype.

Tested on i586-suse-linux, applied on the mainline.

2009-10-02  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>:
	Generate an XVZ variable alongside the XVS type if the size is
	not constant.
	(maybe_pad_type): Minor tweak.

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

More information about the Gcc-patches mailing list