]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Compiler crash on ill-formed container indexing
authorGary Dismukes <dismukes@adacore.com>
Fri, 5 Dec 2025 01:00:19 +0000 (01:00 +0000)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Fri, 9 Jan 2026 10:57:16 +0000 (11:57 +0100)
commitc2a14d071f1fd9a640e33e272f57a7425deec3a2
tree0629ec55c1edb6e92f5ed9fe52654a4d675fb161
parentcf0a79be059e5ad2d58ca6a30429ec90c4879ead
ada: Compiler crash on ill-formed container indexing

The compiler blows up when analyzing an illegal indexing of a container
object (such as a vector) when the indexing expression has the form of
a named actual parameter and the name given for the parameter does not
match the name of the index formal of the corresponding indexing function
that the compiler identifies for doing the generalized indexing.

gcc/ada/ChangeLog:

* sem_ch4.adb (Try_Container_Indexing): Conditionalize last actual of
call to Error_Msg_NE to avoid blowup on N_Parameter_Association actuals.
gcc/ada/sem_ch4.adb