]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Fix spurious type mismatch failure on nested instantiations
authorEric Botcazou <ebotcazou@adacore.com>
Thu, 19 Sep 2019 08:13:01 +0000 (08:13 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Thu, 19 Sep 2019 08:13:01 +0000 (08:13 +0000)
commit4af04d04c427e2ca78bb988cf6b1ad209a99a142
tree6aecebcde170934f49929bc06001f08200b70add
parent682c09cebada73fb80e3a36fec6a3b1a09c5781e
[Ada] Fix spurious type mismatch failure on nested instantiations

This fixes a spurious type mismatch failure reported between formal and
actual of a call to a subprogram that comes from the instantiation of a
child generic unit that itself contains an instantiation of a slibling
child generic unit, when the parent is itself a generic unit with
private part. The regression was introduced by a recent change made to
clear the Is_Generic_Actual_Type on the implicit full view built when a
generic package is instantiated on a private type.

2019-09-19  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

* sem_ch12.adb (Restore_Private_Views): Comment out new code
that clear the Is_Generic_Actual_Type also on the full view.

gcc/testsuite/

* gnat.dg/generic_inst13.adb,
gnat.dg/generic_inst13_pkg-nested_g.ads,
gnat.dg/generic_inst13_pkg-ops_g.ads,
gnat.dg/generic_inst13_pkg.ads: New testcase.

From-SVN: r275935
gcc/ada/ChangeLog
gcc/ada/sem_ch12.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/generic_inst13.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/generic_inst13_pkg-nested_g.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/generic_inst13_pkg-ops_g.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/generic_inst13_pkg.ads [new file with mode: 0644]