[Ada] Misleading warning on unresolvable package name
authorJustin Squirek <squirek@adacore.com>
Mon, 28 May 2018 08:53:00 +0000 (08:53 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 28 May 2018 08:53:00 +0000 (08:53 +0000)
commitaa76fac75101cd8694cedce1bee6a79f1f465130
tree0c3c851ed4519cebdb529dfb48467417b4fe6bb2
parente740ff85bd5f9924128d67db1bb66b6a0ba23518
[Ada] Misleading warning on unresolvable package name

This patch fixes an issue whereby the compiler misidentified a package name
containing the name of a standard runtime package as said package - leading to
and improper error message prompting the user to "With" a package already in
scope.

2018-05-28  Justin Squirek  <squirek@adacore.com>

gcc/ada/

* sem_ch8.adb (Find_Expanded_Name): Add extra guard to make sure the
misresolved package name is not a case of mistaken identity.

gcc/testsuite/

* gnat.dg/warn15-core-main.adb, gnat.dg/warn15-core.ads,
gnat.dg/warn15-interfaces.ads, gnat.dg/warn15.ads: New testcase.

From-SVN: r260817
gcc/ada/ChangeLog
gcc/ada/sem_ch8.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/warn15-core-main.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/warn15-core.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/warn15-interfaces.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/warn15.ads [new file with mode: 0644]