diff options
author | Ed Schonberg <schonberg@adacore.com> | 2018-08-21 14:47:18 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2018-08-21 14:47:18 +0000 |
commit | 78645ad8c7bfaa223ab35595773a4af56660403b (patch) | |
tree | 5552c65284a8c127c60ddf9f6dcf64674d96624e /gcc/ada | |
parent | 1bd9b6a5766c03bc6741d5599076476bd1c9d2b0 (diff) | |
download | gcc-78645ad8c7bfaa223ab35595773a4af56660403b.zip gcc-78645ad8c7bfaa223ab35595773a4af56660403b.tar.gz gcc-78645ad8c7bfaa223ab35595773a4af56660403b.tar.bz2 |
[Ada] Set scope of elaboration flag for 'Access
2018-08-21 Ed Schonberg <schonberg@adacore.com>
gcc/ada/
* sem_attr.adb: Set scope of elaboration flag for 'Access.
From-SVN: r263724
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/ada/sem_attr.adb | 9 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 4afe997..312d891 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,9 @@ 2018-08-21 Ed Schonberg <schonberg@adacore.com> + * sem_attr.adb: Set scope of elaboration flag for 'Access. + +2018-08-21 Ed Schonberg <schonberg@adacore.com> + * sprint.adb: Add guard on printing aspects. 2018-08-21 Javier Miranda <miranda@adacore.com> diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index cb1b2d5d..96eb488 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -11245,6 +11245,15 @@ package body Sem_Attr is New_Occurrence_Of (Standard_Short_Integer, Loc), Expression => Make_Integer_Literal (Loc, Uint_0))); + + -- The above sets the Scope of the flag entity to the + -- current scope, in which the attribute appears, but + -- the flag declaration has been inserted after that + -- of Subp_Id, so the scope of the flag the same as + -- that of Subp_Id. This is relevant when unnesting, + -- whereh processing depends on correct scope settingl + + Set_Scope (Flag_Id, Scop); end if; -- Taking the 'Access of an expression function freezes its |