]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Spurious error on package instantiation
authorJavier Miranda <miranda@adacore.com>
Wed, 3 May 2023 17:30:51 +0000 (17:30 +0000)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 20 Jun 2023 07:30:48 +0000 (09:30 +0200)
commit862f84b4a36d6c569968d20949f54e2f427179c1
tree09dbeb0000bfb10757fdb21bd540467efd97b722
parent869216ec14be5c2be3136de1128b7f1acac3d87e
ada: Spurious error on package instantiation

The compiler reports spurious errors processing the instantation
of a generic package when the instantation is performed in the
the body of a package that has a private type T, a dispatching
primitive of T has the same name as a component of T, and
an extension of T is used as the actual parameter for a
formal derived type of T in the instantiation.

gcc/ada/

* sem_ch4.adb
(Try_Selected_Component_In_Instance): New subprogram; factorizes
existing code.
(Find_Component_In_Instance) Moved inside the new subprogram.
(Analyze_Selected_Component): Invoke the new subprogram before
trying the Object.Operation notation.
gcc/ada/sem_ch4.adb