[Ada] Spurious error on prefixed call in an instantiation
commit118f2d8bc3e6804996ca2953b86454ec950054bf
authorEd Schonberg <schonberg@adacore.com>
Tue, 17 Jul 2018 08:13:28 +0000 (17 08:13 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Tue, 17 Jul 2018 08:13:28 +0000 (17 08:13 +0000)
tree86e45eb96a5f6af1683a831858de4d7b4844ac5d
parent5b4f211d2a7f41f147413d0b756ffe56aec78230
[Ada] Spurious error on prefixed call in an instantiation

This patch fixes a spurious error on a prefixed call in an instance, when the
generic parameters include an interface type and an abstract operation of that
type, and the actuals in the instance include an interface type and a
corresponding abstract operation of it, with a different name than the
corresponding generic subprogram parameter. The patch also fixes a similar
error involving class-wide operations and generic private types.

2018-07-17  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

* sem_ch4.adb (Try_Object_Operation): Handle properly a prefixed call
in an instance, when the generic parameters include an interface type
and a abstract operation of that type, and the actuals in the instance
include an interface type and a corresponding abstract operation of it,
with a different name than the corresponding generic subprogram
parameter.

gcc/testsuite/

* gnat.dg/generic_call_cw.adb, gnat.dg/generic_call_iface.adb: New
testcase.

From-SVN: r262803
gcc/ada/ChangeLog
gcc/ada/sem_ch4.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/generic_call_cw.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/generic_call_iface.adb [new file with mode: 0644]