[Ada] Fix ICE on renaming with discriminated tagged type

Eric Botcazou ebotcazou@adacore.com
Tue Jul 3 08:53:00 GMT 2012


This is a regression present on the mainline and 4.7 branch.  The compiler 
aborts on the renaming of an object with a derived discriminated tagged type 
converted to the parent type, if the parent type is itself derived from a root 
discriminated tagged type and the renaming is later used as a prefix in the 
selection of a component inherited from the root type.

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


2012-07-03  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/utils2.c (build_simple_component_ref): Do not look
	through an extension if the type contains a placeholder.


2012-07-03  Eric Botcazou  <ebotcazou@adacore.com>

	* gnat.dg/discr37.ad[sb]: New test.


-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-diff
Size: 855 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120703/7dd6e4de/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: discr37.adb
Type: text/x-adasrc
Size: 217 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120703/7dd6e4de/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: discr37.ads
Type: text/x-adasrc
Size: 463 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120703/7dd6e4de/attachment-0002.bin>


More information about the Gcc-patches mailing list