[Ada] Fix double elaboration of qualified expression in allocator

Eric Botcazou ebotcazou@adacore.com
Mon Jun 6 09:44:00 GMT 2016

This is a regression present on the mainline and 6 branch: under some peculiar 
circumstances, the qualified expression of an allocator can be elaborated 
twice by gigi.

Tested on x86_64-suse-linux, applied on the mainline and 6 branch.

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

	* gcc-interface/utils2.c (build_call_alloc_dealloc): Do not
	substitute placeholder expressions here but...
	* gcc-interface/trans.c (gnat_to_gnu) <N_Free_Statement>: ...here.
	Make an exception to the protection of a CALL_EXPR result with an
	unconstrained type only in the same cases as Call_to_gnu.

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

More information about the Gcc-patches mailing list