aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2018-05-29 09:41:59 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-05-29 09:41:59 +0000
commit54e33e5f6a0f566e6b0e96da3d5f27449d807248 (patch)
tree6c343f45fb378f49d69674e56804c0bfb61e7747 /gcc/ada
parent895500a2aefb586b3ad34e0dc44563dbb4cb54fb (diff)
downloadgcc-54e33e5f6a0f566e6b0e96da3d5f27449d807248.zip
gcc-54e33e5f6a0f566e6b0e96da3d5f27449d807248.tar.gz
gcc-54e33e5f6a0f566e6b0e96da3d5f27449d807248.tar.bz2
[Ada] Clarify use of Activation_Record_Component
2018-05-29 Ed Schonberg <schonberg@adacore.com> 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
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog7
-rw-r--r--gcc/ada/einfo.adb4
-rw-r--r--gcc/ada/einfo.ads12
3 files changed, 12 insertions, 11 deletions
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 <schonberg@adacore.com>
+ * 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 <schonberg@adacore.com>
+
* sem_ch3.adb: Set scope of component of subtype.
2018-05-29 Ed Schonberg <schonberg@adacore.com>
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.