[Ada] Fix Enclosing_Subprogram for protected entries and task entries
authorEd Schonberg <schonberg@adacore.com>
Tue, 17 Jul 2018 08:06:55 +0000 (08:06 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Tue, 17 Jul 2018 08:06:55 +0000 (08:06 +0000)
commit3567ca3f6be029d5a68722b675df74c2c6945854
tree0fcc14e6808f8c572ba618866885b20f17d5eaab
parenteae2aa7ce1e52e5789410d0ad2d3e10c77ac2fc4
[Ada] Fix Enclosing_Subprogram for protected entries and task entries

2018-07-17  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

* sem_util.adb (Enclosing_Subprogram): Protected entries and task
entries must be treated separately: task entries are within the
enclosing subprogram of the task type, while protected entries are
transformed into the corresponding Protected_Body_Subprogram, which is
the enclosing_subprogram of any subprogram declared within the entry
body.

From-SVN: r262778
gcc/ada/ChangeLog
gcc/ada/sem_util.adb