[Ada] Fix internal error on problematic renaming
Eric Botcazou
botcazou@adacore.com
Mon May 25 08:46:41 GMT 2020
This is an internal renaming generated for a generalized loop iteration made
on a tagged record type with predicate, and gigi cannot use the most efficient
way of implementing renamings because the renamed object is an expression with
a non-empty Actions list.
Tested on x86-64/Linux, applied on the mainline.
2020-05-25 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity): Add new local variable
and use it throughout the function.
<E_Variable>: Rename local variable and adjust accordingly. In the
case of a renaming, materialize the entity if the renamed object is
an N_Expression_With_Actions node.
<E_Procedure>: Use Alias accessor function consistently.
2020-05-25 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/renaming16.adb: New test.
* gnat.dg/renaming16_pkg.ads: New helper.
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-patch
Size: 14955 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200525/74cf93e7/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: renaming16.adb
Type: text/x-adasrc
Size: 218 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200525/74cf93e7/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: renaming16_pkg.ads
Type: text/x-adasrc
Size: 930 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200525/74cf93e7/attachment-0002.bin>
More information about the Gcc-patches
mailing list