From: Piotr Trojanek <troja...@adacore.com> Code cleanup; behaviour is unaffected.
gcc/ada/ * sem_attr.adb (Analyze_Access_Attribute): Replace loop with Current_Scope_No_Loops. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_attr.adb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 6140cc0c0d6..e80a144ebb2 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -988,10 +988,7 @@ package body Sem_Attr is -- expanded into a loop. Locate scope of type definition, -- if any. - Scop := Current_Scope; - while Ekind (Scop) = E_Loop loop - Scop := Scope (Scop); - end loop; + Scop := Current_Scope_No_Loops; -- OK if we are within the scope of a limited type -- let's mark the component as having per object constraint -- 2.43.2