From: Piotr Trojanek <troja...@adacore.com> Code cleanup; semantics is unaffected.
gcc/ada/ * sem_ch13.adb (Analyze_Aspect_Specification): Consistently reuse existing constant where possible. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch13.adb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index ce9f15c1491..00392ae88eb 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -1838,7 +1838,7 @@ package body Sem_Ch13 is Make_Pragma_Argument_Association (Loc, Expression => Conv), Make_Pragma_Argument_Association (Loc, - Expression => New_Occurrence_Of (E, Loc)))); + Expression => Ent))); Decorate (Aspect, Aitem); Insert_Pragma (Aitem); @@ -3099,7 +3099,7 @@ package body Sem_Ch13 is Aitem := Make_Aitem_Pragma (Pragma_Argument_Associations => New_List ( Make_Pragma_Argument_Association (Loc, - Expression => New_Occurrence_Of (E, Loc)), + Expression => Ent), Make_Pragma_Argument_Association (Sloc (Expr), Expression => Relocate_Node (Expr))), Pragma_Name => Name_Linker_Section); @@ -3120,7 +3120,7 @@ package body Sem_Ch13 is Aitem := Make_Aitem_Pragma (Pragma_Argument_Associations => New_List ( Make_Pragma_Argument_Association (Loc, - Expression => New_Occurrence_Of (E, Loc)), + Expression => Ent), Make_Pragma_Argument_Association (Sloc (Expr), Expression => Relocate_Node (Expr))), Pragma_Name => Name_Implemented); @@ -3439,7 +3439,7 @@ package body Sem_Ch13 is Make_Pragma_Argument_Association (Loc, Expression => Relocate_Node (Expr)), Make_Pragma_Argument_Association (Sloc (Expr), - Expression => New_Occurrence_Of (E, Loc))), + Expression => Ent)), Pragma_Name => Nam); Delay_Required := False; @@ -3452,7 +3452,7 @@ package body Sem_Ch13 is Make_Pragma_Argument_Association (Sloc (Expr), Expression => Relocate_Node (Expr)), Make_Pragma_Argument_Association (Loc, - Expression => New_Occurrence_Of (E, Loc))), + Expression => Ent)), Pragma_Name => Name_Warnings); Decorate (Aspect, Aitem); -- 2.43.2