]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Crash on Loop_Entry for while_loop involving substrings
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 20 Aug 2019 09:50:00 +0000 (09:50 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 20 Aug 2019 09:50:00 +0000 (09:50 +0000)
commit01c307f1688ff45bbe6be94bd87856c6679b40bd
tree9c05a43e1234080f351d8318fad0884467a8d662
parentbde0f5d5e44a5e471ca9b34487d5e34331fd2c22
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@274734 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/ChangeLog
gcc/ada/exp_attr.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/loop_entry2.adb [new file with mode: 0644]