[Ada] Spurious error on formal package with overloaded subprograms
Pierre-Marie de Rodat
derodat@adacore.com
Thu Nov 26 08:41:00 GMT 2020
Compiler rejects an instantiation involving a formal package that
contains adjacent subprogram declarations with the same name, because in
the matching between entities in the formal package and the
corresponding actual package, it maps two successive entities in the
formal with the same entity (with a different signature) in the actual.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch12.adb (Instantiate_Formal_Package): If previous matched
entity is overloadable, advance in the list of actuals of the
actual package, to prevent an erroneous match of two adjacent
overloadable homonyms with the same entity.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 907 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20201126/33460a8e/attachment-0001.bin>
More information about the Gcc-patches
mailing list