[Ada] Spurious ineffective use_clause warning
authorJustin Squirek <squirek@adacore.com>
Wed, 26 Sep 2018 09:19:53 +0000 (09:19 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Wed, 26 Sep 2018 09:19:53 +0000 (09:19 +0000)
commit0ebf09ed046391377af708ab2471403d3affdddd
tree9daee39e9cfe4cf3897f36e82bf02f98605ec927
parentcec0185c7e02aa52ffceddbf46a16a66ed47459c
[Ada] Spurious ineffective use_clause warning

This patch fixes an issue whereby user-defined subprograms used as
generic actuals with corresponding formals containing other formal types
led to spurious ineffective use_clause warnings.

2018-09-26  Justin Squirek  <squirek@adacore.com>

gcc/ada/

* sem_ch8.adb (Analyze_Subprogram_Renaming): Add extra condition
to check for unmarked subprogram references coming from
renamings.

gcc/testsuite/

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

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