diff options
author | Hristian Kirtchev <kirtchev@adacore.com> | 2018-08-21 14:44:56 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2018-08-21 14:44:56 +0000 |
commit | 3f99a611cab3ff6f5dab0e99ec2cf3a89b99cb1b (patch) | |
tree | 10e915ea6720402f7c1bf641bc7124a160273fac /gcc/ada/einfo.adb | |
parent | 83fadfd9ab43f7870d309ebb46e460cec82994a2 (diff) | |
download | gcc-3f99a611cab3ff6f5dab0e99ec2cf3a89b99cb1b.zip gcc-3f99a611cab3ff6f5dab0e99ec2cf3a89b99cb1b.tar.gz gcc-3f99a611cab3ff6f5dab0e99ec2cf3a89b99cb1b.tar.bz2 |
[Ada] Crash on entry in generic with dynamic elaboration checks
This patch modifies the set of attributes that applies to entries and
entry families to include elaboration entities used by the
access-before-elaboration mechanism.
2018-08-21 Hristian Kirtchev <kirtchev@adacore.com>
gcc/ada/
* einfo.adb (Elaboration_Entity): Include entries and entry
families in the set of legal entities.
(Elaboration_Entity_Required): Include entries and entry
families in the set of legal entities.
(Set_Elaboration_Entity): Include entries and entry families in
the set of legal entities.
(Set_Elaboration_Entity_Required): Include entries and entry
families in the set of legal entities.
(Write_Field13_Name): Update the output of attribute
Elaboration_Entity.
* einfo.ads: Attributes Elaboration_Entity and
Elaboration_Entity_Required now apply to entries and entry
families.
gcc/testsuite/
* gnat.dg/elab6.adb, gnat.dg/elab6.ads, gnat.dg/elab6_pkg.adb,
gnat.dg/elab6_pkg.ads: New testcase.
From-SVN: r263712
Diffstat (limited to 'gcc/ada/einfo.adb')
-rw-r--r-- | gcc/ada/einfo.adb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb index e89ea5a..c9cdfc2 100644 --- a/gcc/ada/einfo.adb +++ b/gcc/ada/einfo.adb @@ -1182,7 +1182,7 @@ package body Einfo is pragma Assert (Is_Subprogram (Id) or else - Ekind (Id) = E_Package + Ekind_In (Id, E_Entry, E_Entry_Family, E_Package) or else Is_Generic_Unit (Id)); return Node13 (Id); @@ -1193,7 +1193,7 @@ package body Einfo is pragma Assert (Is_Subprogram (Id) or else - Ekind (Id) = E_Package + Ekind_In (Id, E_Entry, E_Entry_Family, E_Package) or else Is_Generic_Unit (Id)); return Flag174 (Id); @@ -4412,7 +4412,7 @@ package body Einfo is pragma Assert (Is_Subprogram (Id) or else - Ekind (Id) = E_Package + Ekind_In (Id, E_Entry, E_Entry_Family, E_Package) or else Is_Generic_Unit (Id)); Set_Node13 (Id, V); @@ -4423,7 +4423,7 @@ package body Einfo is pragma Assert (Is_Subprogram (Id) or else - Ekind (Id) = E_Package + Ekind_In (Id, E_Entry, E_Entry_Family, E_Package) or else Is_Generic_Unit (Id)); Set_Flag174 (Id, V); @@ -10355,7 +10355,9 @@ package body Einfo is => Write_Str ("Component_Clause"); - when E_Function + when E_Entry + | E_Entry_Family + | E_Function | E_Procedure | E_Package | Generic_Unit_Kind |