[Ada] Refine logic to set Needs_Activation_Record on subprogram types
authorEd Schonberg <schonberg@adacore.com>
Wed, 30 May 2018 08:57:11 +0000 (08:57 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Wed, 30 May 2018 08:57:11 +0000 (08:57 +0000)
commit131780ac08a8dfc1b9c14a9d5c38575fcc34b205
tree03135074ed1d7327cd5b9f8fa522268ee535798c
parentdf8aa2b7e18670c97076083ea292a0a7b2d08263
[Ada] Refine logic to set Needs_Activation_Record on subprogram types

2018-05-30  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

* sem_ch3.adb (Access_Subprogram_Declaration): The flag
Needs_Activation_Record is only needed on a subprogram type, not on a
pointer to such.
* sem_res.adb (Resolve_Selected_Component): If the context type and the
component type are anonymous access to subprograms, use the component
type to obtain the proper value of Needs_Activation_Record flag for the
expression.

From-SVN: r260932
gcc/ada/ChangeLog
gcc/ada/sem_ch3.adb
gcc/ada/sem_res.adb