]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Failure compiling "for ... of" loop over a slice
authorSteve Baird <baird@adacore.com>
Fri, 14 Jan 2022 22:10:25 +0000 (14:10 -0800)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 10 May 2022 08:19:21 +0000 (08:19 +0000)
commita445a8692c43d14c494e1edf505ee4f33cb98bb6
treefe3033771bba214d53211df1687fdc2a57388706
parent3d9e2004fe4e15b133bd8472c4bf46cbff809583
[Ada] Failure compiling "for ... of" loop over a slice

In some cases involving a "for ... of" loop (not to be confused with the
more common "for ... in" loop) iterating over a slice, compilation would
fail with an internal compiler error.

gcc/ada/

* sem_util.adb (Get_Actual_Subtype): If a new subtype is built,
do not freeze it if Expander_Active is False. The idea here is
to avoid generating an unwanted Freeze_Node for a subtype that
has been conjured up solely for purposes of preanalysis.
gcc/ada/sem_util.adb