From: Justin Squirek Date: Wed, 27 Mar 2024 01:02:41 +0000 (+0000) Subject: ada: Handle accessibility calculations for 'First and 'Last X-Git-Tag: basepoints/gcc-16~8872 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b226e5605a6e1833da85590b10a5acf0b16d00d8;p=thirdparty%2Fgcc.git ada: Handle accessibility calculations for 'First and 'Last This patch fixes a crash in the compiler whereby calculating the accessibility level of of a local variable whose original expression is an 'First on an array type led to an error during compilation. gcc/ada/ * accessibility.adb (Accessibility_Level): Add cases for 'First and 'Last. --- diff --git a/gcc/ada/accessibility.adb b/gcc/ada/accessibility.adb index c0a9d50f38a..33ce001718a 100644 --- a/gcc/ada/accessibility.adb +++ b/gcc/ada/accessibility.adb @@ -465,7 +465,15 @@ package body Accessibility is -- so handle these cases explicitly. elsif Attribute_Name (E) - in Name_Old | Name_Loop_Entry | Name_Result | Name_Super + in Name_Old | + Name_Loop_Entry | + Name_Result | + Name_Super | + Name_Tag | + Name_Safe_First | + Name_Safe_Last | + Name_First | + Name_Last then -- Named access types