Commit 14f8ba9a by Ed Schonberg Committed by Pierre-Marie de Rodat

[Ada] Unnesting: exclude selected components whose prefix carry no type

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

gcc/ada/

	* exp_unst.adb (Visit_Node): Exclude selected components whose prefix
	carry no type. Such selected components appear in unit names that are
	child units, both in the specification and possibly in an end label for
	the unit, and they do not contain any relevant uplevel references.

From-SVN: r260879
parent ec3b72c5
2018-05-29 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb (Visit_Node): Exclude selected components whose prefix
carry no type. Such selected components appear in unit names that are
child units, both in the specification and possibly in an end label for
the unit, and they do not contain any relevant uplevel references.
2018-05-29 Arnaud Charlet <charlet@adacore.com> 2018-05-29 Arnaud Charlet <charlet@adacore.com>
* libgnat/a-calend.ads, libgnat/a-calend.adb (Epoch_Offset): Make it a * libgnat/a-calend.ads, libgnat/a-calend.adb (Epoch_Offset): Make it a
......
...@@ -753,7 +753,13 @@ package body Exp_Unst is ...@@ -753,7 +753,13 @@ package body Exp_Unst is
-- simplify the processing here by examining all components -- simplify the processing here by examining all components
-- of the record. -- of the record.
elsif Nkind (N) = N_Selected_Component then -- Selected components appear as unit names and end labels for
-- child units. The prefixes of these nodes denote parent
-- units and carry no type information so they are skipped.
elsif Nkind (N) = N_Selected_Component
and then Present (Etype (Prefix (N)))
then
declare declare
DT : Boolean := False; DT : Boolean := False;
begin begin
......
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