Commit f4bf7b62 by Ed Schonberg Committed by Pierre-Marie de Rodat

[Ada] Don't create empty activation records

2018-05-28  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

	* exp_unst.adb (Unnest_Subprogram): Prevent creation of empty
	activation records.

From-SVN: r260831
parent 577ad216
2018-05-28 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb (Unnest_Subprogram): Prevent creation of empty
activation records.
2018-05-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* exp_unst.adb (Check_Static_Type): Add argument to indicate node to be
......
......@@ -411,10 +411,13 @@ package body Exp_Unst is
-- Entity name case. Make sure that the entity is declared
-- in a subprogram. This may not be the case for for a type
-- in a loop appearing in a precondition.
-- Exclude explicitly discriminants (that can appear
-- in bounds of discriminated components).
if Is_Entity_Name (N) then
if Present (Entity (N))
and then Present (Enclosing_Subprogram (Entity (N)))
and then Ekind (Entity (N)) /= E_Discriminant
then
Note_Uplevel_Ref
(E => Entity (N),
......
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