]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: GNAT-LLVM compiler crash on container aggregates with iterators
authorGary Dismukes <dismukes@adacore.com>
Tue, 23 Jul 2024 21:05:29 +0000 (21:05 +0000)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Tue, 6 Aug 2024 08:54:31 +0000 (10:54 +0200)
commitc0c1e02070f3b05eb9cd0001028be45bbe847ced
treed1fa4fd6b19010f23c77fdb8b68d55fa7617af1b
parent3e2b3dd728d851480bb752055bb0937cd4812ef1
ada: GNAT-LLVM compiler crash on container aggregates with iterators

Recent fixes for container aggregates with iterated element associations
exposed a latent bug with loops that are wrapped in blocks, where the loop
entity's scope was not adjusted to reflect the new enclosing block scope.

gcc/ada/

* sem_ch5.adb (Analyze_Loop_Statement.Wrap_Loop_Statement): Remove
the loop Entity_Id from its old scope and insert it in the new
block scope that wraps it.
gcc/ada/sem_ch5.adb