[Ada] Fix ICE on string concatenation with -gnatd.h

Eric Botcazou ebotcazou@adacore.com
Mon Oct 27 11:37:00 GMT 2014


This fixes an ICE on a string concatenation with the -gnatd.h switch, which 
causes TREE_PUBLIC to be set on a local temporary 

Tested on x86_64-suse-linux, applied on mainline.


2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/utils.c (create_var_decl_1): For a variable declared
	in the unit, set TREE_PUBLIC only if it has static storage duration.


2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>

	* gnat.dg/specs/concat1.ads: New test.
	* gnat.dg/specs/concat1_pkg.ads: New helper.


-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-patch
Size: 5419 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20141027/9f7df543/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: concat1.ads
Type: text/x-adasrc
Size: 173 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20141027/9f7df543/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: concat1_pkg.ads
Type: text/x-adasrc
Size: 178 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20141027/9f7df543/attachment-0002.bin>


More information about the Gcc-patches mailing list