[Ada] Crash on use of generic formal package
authorJustin Squirek <squirek@adacore.com>
Wed, 14 Nov 2018 11:41:46 +0000 (11:41 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Wed, 14 Nov 2018 11:41:46 +0000 (11:41 +0000)
commitb7c34dff67750bf38d8b8d89ea44c01d8c7c5870
tree05250ad3367e561bee78911884597e2235d93b1d
parent41a59f6b14660aaf802d749a22d07c14660312ed
[Ada] Crash on use of generic formal package

This patch fixes an issue whereby a complicated set of generic formal
packages in conjunction with use_clauses may cause a crash during
visibility checking due to a homonym being out of scope during the
checking stage.

2018-11-14  Justin Squirek  <squirek@adacore.com>

gcc/ada/

* sem_ch8.adb (Use_One_Package): Add test for out-of-scope
homonyms.

gcc/testsuite/

* gnat.dg/generic_pkg.adb: New testcase.

From-SVN: r266126
gcc/ada/ChangeLog
gcc/ada/sem_ch8.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/generic_pkg.adb [new file with mode: 0644]