From: Justin Squirek <squi...@adacore.com> 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. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/accessibility.adb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 -- 2.43.2