Commit 78645ad8 by Ed Schonberg Committed by Pierre-Marie de Rodat

[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
parent 1bd9b6a5
2018-08-21 Ed Schonberg <schonberg@adacore.com> 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. * sprint.adb: Add guard on printing aspects.
2018-08-21 Javier Miranda <miranda@adacore.com> 2018-08-21 Javier Miranda <miranda@adacore.com>
......
...@@ -11245,6 +11245,15 @@ package body Sem_Attr is ...@@ -11245,6 +11245,15 @@ package body Sem_Attr is
New_Occurrence_Of (Standard_Short_Integer, Loc), New_Occurrence_Of (Standard_Short_Integer, Loc),
Expression => Expression =>
Make_Integer_Literal (Loc, Uint_0))); 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; end if;
-- Taking the 'Access of an expression function freezes its -- Taking the 'Access of an expression function freezes its
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment