[Ada] Adjust previous change to Rewrite_As_Renaming
gcc/ada/ * exp_ch3.adb (Expand_N_Object_Declaration.Rewrite_As_Renaming): Do not rewrite if the declaration has got constraints. * sinfo.ads (Case Expression Alternative): Fix typo.
This commit is contained in:
parent
2cad8a59a8
commit
0896e2b79a
@ -6865,13 +6865,20 @@ package body Exp_Ch3 is
|
||||
and then
|
||||
OK_To_Rename_Entity_Name (Prefix (Expr_Q)))));
|
||||
begin
|
||||
-- ??? Return False if there are any aspect specifications, because
|
||||
-- otherwise we duplicate that corresponding implicit attribute
|
||||
-- definition, and call Insert_Action, which has no place to insert
|
||||
-- the attribute definition. The attribute definition is stored in
|
||||
-- Aspect_Rep_Item, which is not a list.
|
||||
return Result
|
||||
|
||||
return Result and then No (Aspect_Specifications (N));
|
||||
-- The declaration cannot be rewritten if it has got constraints,
|
||||
-- in other words the nominal subtype must be unconstrained.
|
||||
|
||||
and then Is_Entity_Name (Original_Node (Obj_Def))
|
||||
|
||||
-- ??? Return False if there are any aspect specifications, because
|
||||
-- otherwise we duplicate that corresponding implicit attribute
|
||||
-- definition, and call Insert_Action, which has no place to insert
|
||||
-- the attribute definition. The attribute definition is stored in
|
||||
-- Aspect_Rep_Item, which is not a list.
|
||||
|
||||
and then No (Aspect_Specifications (N));
|
||||
end Rewrite_As_Renaming;
|
||||
|
||||
-- Local variables
|
||||
|
@ -4651,7 +4651,7 @@ package Sinfo is
|
||||
|
||||
-- Note: The Actions field temporarily holds any actions associated with
|
||||
-- evaluation of the Expression. During expansion of the case expression
|
||||
-- these actions are wrapped into an N_Expressions_With_Actions node
|
||||
-- these actions are wrapped into an N_Expression_With_Actions node
|
||||
-- replacing the original expression.
|
||||
|
||||
-- Note: this node never appears in the tree passed to the back end,
|
||||
|
Loading…
Reference in New Issue
Block a user