[Ada] Crash on Loop_Entry for while_loop involving substrings
When expanding a loop entry attribute for a while_loop we construct a
function that incorporates the expanded condition of the loop. The
itypes that may be generated in that expansion must carry the scope of
the constructed function for proper handling in the backend.
2019-08-20 Ed Schonberg <schonberg@adacore.com>
gcc/ada/
* exp_attr.adb (Expand_Loop_Entry_Attribute): When expanding a
loop entry attribute for a while_loop we construct a function
that incorporates the expanded condition of the loop. The itypes
that may be generated in that expansion must carry the scope of
the constructed function for proper handling in gigi.
gcc/testsuite/
* gnat.dg/loop_entry2.adb: New testcase.
From-SVN: r274734