[Ada] Simplify folding of selected components with qualified prefixes

gcc/ada/

	* sem_eval.adb (Eval_Selected_Component): Simplify with
	Unqualify.
This commit is contained in:
Piotr Trojanek 2020-12-09 17:02:26 +01:00 committed by Pierre-Marie de Rodat
parent 35e3a1f670
commit 43d5138227

View File

@ -3847,11 +3847,7 @@ package body Sem_Eval is
-- Simplify a selected_component on an aggregate by extracting
-- the field directly.
Node := Prefix (N);
while Nkind (Node) = N_Qualified_Expression loop
Node := Expression (Node);
end loop;
Node := Unqualify (Prefix (N));
if Nkind (Node) = N_Aggregate then
Comp := First (Component_Associations (Node));