[Ada] Fix spurious type mismatch failure on nested instantiations

Pierre-Marie de Rodat derodat@adacore.com
Thu Sep 19 13:28:00 GMT 2019


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.

Tested on x86_64-pc-linux-gnu, committed on trunk

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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 2834 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190919/b072c37a/attachment.bin>


More information about the Gcc-patches mailing list