[Ada] Crash on entry in generic with dynamic elaboration checks
authorHristian Kirtchev <kirtchev@adacore.com>
Tue, 21 Aug 2018 14:44:56 +0000 (14:44 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Tue, 21 Aug 2018 14:44:56 +0000 (14:44 +0000)
commit3f99a611cab3ff6f5dab0e99ec2cf3a89b99cb1b
tree10e915ea6720402f7c1bf641bc7124a160273fac
parent83fadfd9ab43f7870d309ebb46e460cec82994a2
[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
gcc/ada/ChangeLog
gcc/ada/einfo.adb
gcc/ada/einfo.ads
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/elab6.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/elab6.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/elab6_pkg.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/elab6_pkg.ads [new file with mode: 0644]