From: Ed Schonberg Date: Tue, 29 May 2018 09:41:59 +0000 (+0000) Subject: [Ada] Clarify use of Activation_Record_Component X-Git-Tag: upstream/12.2.0~31398 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=54e33e5f6a0f566e6b0e96da3d5f27449d807248;p=platform%2Fupstream%2Fgcc.git [Ada] Clarify use of Activation_Record_Component 2018-05-29 Ed Schonberg gcc/ada/ * einfo.ads, einfo.adb: Clarify use of Activation_Record_Component: discriminants and exceptions are never components of such. The flag Needs_Activation_Record is set on subprogram types, not on access to them. From-SVN: r260881 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index fe5b58b..86d6680 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,12 @@ 2018-05-29 Ed Schonberg + * einfo.ads, einfo.adb: Clarify use of Activation_Record_Component: + discriminants and exceptions are never components of such. The flag + Needs_Activation_Record is set on subprogram types, not on access to + them. + +2018-05-29 Ed Schonberg + * sem_ch3.adb: Set scope of component of subtype. 2018-05-29 Ed Schonberg diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb index fd77d41..5d1433b 100644 --- a/gcc/ada/einfo.adb +++ b/gcc/ada/einfo.adb @@ -743,8 +743,6 @@ package body Einfo is function Activation_Record_Component (Id : E) return E is begin pragma Assert (Ekind_In (Id, E_Constant, - E_Discriminant, - E_Exception, E_In_Parameter, E_In_Out_Parameter, E_Loop_Parameter, @@ -3958,8 +3956,6 @@ package body Einfo is procedure Set_Activation_Record_Component (Id : E; V : E) is begin pragma Assert (Ekind_In (Id, E_Constant, - E_Discriminant, - E_Exception, E_In_Parameter, E_In_Out_Parameter, E_Loop_Parameter, diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads index 665d578..6c37941 100644 --- a/gcc/ada/einfo.ads +++ b/gcc/ada/einfo.ads @@ -364,12 +364,10 @@ package Einfo is -- the IP routine to avoid performing this elaboration twice. -- Activation_Record_Component (Node31) --- Defined in E_Variable, E_Constant, E_Discriminant, E_Loop_Parameter, --- E_In_Parameter, E_Out_Parameter, E_In_Out_Parameter nodes. Used only --- if we are in Opt.Unnest_Subprogram_Mode, in which case for the case of --- an uplevel referenced entity, this field contains the entity for the --- component in the generated ARECnT activation record (Exp_Unst for --- details). +-- Defined for E_Variable, E_Constant, E_Loop_Parameter, and formal +-- parameter entities. Used in Opt.Unnest_Subprogram_Mode, in which case +-- a reference to an uplevel entity produces a corresponding component +-- in the generated ARECnT activation record (Exp_Unst for details). -- Actual_Subtype (Node17) -- Defined in variables, constants, and formal parameters. This is the @@ -3535,7 +3533,7 @@ package Einfo is -- to the freeze point because of the rule about overriding Initialize). -- Needs_Activation_Record (Flag306) --- Defined on access_to_subprogram types. Indicates that a call through +-- Defined on generated subprogram types. Indicates that a call through -- a named or anonymous access to subprogram requires an activation -- record when compiling with unnesting for C or LLVM.