[gcc r16-1361] ada: Factorize initialization of local variable
Marc Poulhies
dkm@gcc.gnu.org
Tue Jun 10 07:34:13 GMT 2025
https://gcc.gnu.org/g:043596fa26b9bf0e03fa8c8ce4986eb8aa8218c3
commit r16-1361-g043596fa26b9bf0e03fa8c8ce4986eb8aa8218c3
Author: Ronan Desplanques <desplanques@adacore.com>
Date: Mon Mar 17 17:15:29 2025 +0100
ada: Factorize initialization of local variable
gcc/ada/ChangeLog:
* sem_ch3.adb (Process_Subtype): Factorize initialization of variable.
Diff:
---
gcc/ada/sem_ch3.adb | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 1263d7004d9f..0c262aa40f36 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -22555,7 +22555,7 @@ package body Sem_Ch3 is
-- Local variables
- P : Node_Id;
+ P : constant Node_Id := Parent (S);
Def_Id : Entity_Id;
Error_Node : Node_Id;
Full_View_Id : Entity_Id;
@@ -22579,7 +22579,6 @@ package body Sem_Ch3 is
end if;
Check_Incomplete (S);
- P := Parent (S);
if Excludes_Null then
-- Create an Itype that is a duplicate of Entity (S) but with the
@@ -22652,7 +22651,6 @@ package body Sem_Ch3 is
Check_Incomplete (Subtype_Mark (S));
end if;
- P := Parent (S);
Subtype_Mark_Id := Entity (Subtype_Mark (S));
-- Explicit subtype declaration case
More information about the Gcc-cvs
mailing list