[Ada] Internal error on inlined renaming of subprogram instance
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 9 Oct 2018 15:06:11 +0000 (15:06 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Tue, 9 Oct 2018 15:06:11 +0000 (15:06 +0000)
commit0444d0671d2696d9a3eef8ce01fe77f82702c0e3
tree9a1cd800843984fb0892e61eb573708d977d4639
parentc14bd5028a410a277b2e0ba8ffbfe8ee58e74d00
[Ada] Internal error on inlined renaming of subprogram instance

This fixes a recent regression introduced in the compiler for the
inlined renaming of a subprogram instantiated in a package body.  It was
wrongly clearing the Is_Public flag on the entity associated with the
body.

2018-10-09  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

* sem_ch7.adb (Has_Referencer): Add comment for the
N_Freeze_Entity case.  Do not rely on
Has_Referencer_Of_Non_Subprograms to clear the Is_Public flag on
subprogram entities.

gcc/testsuite/

* gnat.dg/inline14.adb, gnat.dg/inline14_pkg.adb,
gnat.dg/inline14_pkg.ads: New testcase.

From-SVN: r264975
gcc/ada/ChangeLog
gcc/ada/sem_ch7.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/inline14.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/inline14_pkg.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/inline14_pkg.ads [new file with mode: 0644]