[Ada] Fix ICE on deferred constant with tagged type

Eric Botcazou ebotcazou@adacore.com
Mon Jun 6 10:22:00 GMT 2011


This is again the compiler trying to create a temporary for a VIEW_CONVERT_EXPR 
and the type doesn't allow it.  Fixed by not generating the VIEW_CONVERT_EXPR 
in the first place.

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


2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
	constants whose full view has discriminants specially.


2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>

	* gnat.dg/deferred_const4.ad[sb]: New test.
	* gnat.dg/deferred_const4_pkg.ads: New helper.


-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-diff
Size: 908 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110606/5f5498d3/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deferred_const4.adb
Type: text/x-adasrc
Size: 174 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110606/5f5498d3/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deferred_const4_pkg.ads
Type: text/x-adasrc
Size: 347 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110606/5f5498d3/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deferred_const4.ads
Type: text/x-adasrc
Size: 279 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110606/5f5498d3/attachment-0003.bin>


More information about the Gcc-patches mailing list