[Ada] Fix ICE on unaligned representation clause

Eric Botcazou ebotcazou@adacore.com
Sat Sep 8 12:20:00 GMT 2007


When Gigi is building the type of a record with a representation clause,
it attempts to make it possible to pack the components of the record as
much as possible by making "packable" types for them, i.e. types that
are suitable for bitwise manipulation by the back-end.

The problem here is that the back-end does not allow Gigi to make such a
type for a component whose type is a record type which itself contains
a composite type, thus leading to an ICE during RTL expansion.

The fix is to try harder in Gigi to make the type at stake.

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


2007-09-08  Eric Botcazou  <ebotcazou@adacore.com>

	* decl.c (make_packable_type): If the new type has been given BLKmode,
	try again to get an integral mode for it.


2007-09-08  Eric Botcazou  <ebotcazou@adacore.com>

	* gnat.dg/unaligned_rep_clause.adb: New testcase.


-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-diff
Size: 625 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070908/67133d0f/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unaligned_rep_clause.adb
Type: text/x-adasrc
Size: 667 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070908/67133d0f/attachment-0001.bin>


More information about the Gcc-patches mailing list