[Ada] Unnesting problems with expansion of Loop_Entry attribute
Pierre-Marie de Rodat
derodat@adacore.com
Wed Jun 3 10:03:04 GMT 2020
For expansion of a Loop_Entry attribute, a function body is generated in
association with the condition of a generated while loop, and the
entities within the function need to have their scopes reset to the
function Entity_Id, for proper handling of up-level-reference processing
in the GNAT-LLVM compiler. The existing handling only did this for
itypes associated with the loop, but there can be other kinds of
entities that also need to be reset, so the condition of the loop was
relaxed to allow resetting for more entity cases. However, note that the
fix is likely still incomplete (potentially allowing either too many or
too few entity cases).
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-03 Gary Dismukes <dismukes@adacore.com>
gcc/ada/
* exp_attr.adb (Expand_Loop_Entry_Attribute): Revise loop that
resets the scopes of entities associated with Loop_Id to the
scope of the new function, so the resetting is not restricted to
itypes, but excludes loop parameters and the function entity
itself. However, this fix is believed to be incomplete and a ???
comment is added to indicate that.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 2266 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200603/f751df6e/attachment.bin>
More information about the Gcc-patches
mailing list