Replacing the original expression by Expression_Of_Expression_Function is
not fully equivalent because Expression_Of_Expression_Function returns the
Original_Node of the expression.
gcc/ada/ChangeLog:
* sem_ch8.adb (Analyze_Subprogram_Renaming): Retrieve again the
expression of the expression function manually.
Freeze_Expr_Types
(Def_Id => Entity (Nam),
Typ => Etype (Entity (Nam)),
- Expr => Expression_Of_Expression_Function (Entity (Nam)),
+ Expr =>
+ Expression
+ (Original_Node (Unit_Declaration_Node (Entity (Nam)))),
N => N);
end if;