+2018-06-11 Ed Schonberg <schonberg@adacore.com>
+
+ * exp_ch7.adb (Check_Unnesting_Elaboration_Code): Add guard.
+
2018-06-11 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb (Visit_Node): Skip generic associations.
then
Stat := First (Statements (Handled_Statement_Sequence (N)));
while Present (Stat) loop
- if Nkind (Stat) = N_Block_Statement then
- exit;
- end if;
-
+ exit when Nkind (Stat) = N_Block_Statement
+ and then Present (Identifier (Stat));
Next (Stat);
end loop;
First (Statements (Handled_Statement_Sequence (Elab_Body)));
while Present (Stat) loop
- if Nkind (Stat) = N_Block_Statement then
+ if Nkind (Stat) = N_Block_Statement
+ and then Present (Identifier (Stat))
+ then
Set_Scope (Entity (Identifier (Stat)), Elab_Proc);
end if;