[Ada] Compiler crash on -gnata -O2
authorJavier Miranda <miranda@adacore.com>
Tue, 15 Feb 2022 19:09:48 +0000 (19:09 +0000)
committerPierre-Marie de Rodat <derodat@adacore.com>
Fri, 13 May 2022 08:04:45 +0000 (08:04 +0000)
commitd663778287d3bd908b5e059f640ca6a02bb0f487
treec909dc3df56af51314f1e1e4d90120413fb35afe
parent78e26388edb20bc827a8c0504010621f01204af2
[Ada] Compiler crash on -gnata -O2

gcc/ada/

* contracts.adb (Build_Unique_Name): New subprogram.
(Make_Class_Precondition_Subps): Use Build_Unique_Name to
generate the names of the call helpers and the name of indirect
call wrappers.
* freeze.adb (Needs_Wrapper): Remove dead code.
(Check_Inherited_Conditions): Defer building helpers and ICW
until all the dispatch table wrappers have been built and
analyzed. Required to ensure uniqueness in their names because
when building these wrappers for overlapped subprograms their
homonym number is not definite until they have been analyzed.
gcc/ada/contracts.adb
gcc/ada/freeze.adb