[Ada] Spurious visibility error in generic child unit
commit46fa6b050e81504aab992d58b693aa81dd45eeb9
authorEd Schonberg <schonberg@adacore.com>
Thu, 19 Sep 2019 08:14:08 +0000 (19 08:14 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Thu, 19 Sep 2019 08:14:08 +0000 (19 08:14 +0000)
treeec318c027eeff071e8ac3c903adcdd563a59a78b
parent231ef54b96d6022bc844107f50490ba5c96f4a50
[Ada] Spurious visibility error in generic child unit

2019-09-19  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

* sem_ch7.adb (Install_Parent_Private_Declarations): If a
generic child unit is instantiated within a sibling child unit,
the analysis of its private part requires that the private part
of the ancestor be available, as is done when the context
includes an instance of the ancestor.

gcc/testsuite/

* gnat.dg/generic2-child.ads, gnat.dg/generic2-io_any.adb,
gnat.dg/generic2-io_any.ads, gnat.dg/generic2.ads: New testcase.

From-SVN: r275949
gcc/ada/ChangeLog
gcc/ada/sem_ch7.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/generic2-child.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/generic2-io_any.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/generic2-io_any.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/generic2.ads [new file with mode: 0644]