This plugs an old loophole in Analyze_Attribute for the handling of the
GNAT specific Unrestricted_Access attribute.
gcc/ada/
PR ada/126482
* sem_attr.adb (Analyze_Attribute): Treat Unrestricted_Access like
[Unchecked_]Access when it comes to the overloading of the prefix.
and then Aname /= Name_Code_Address
and then Aname /= Name_Result
and then Aname /= Name_Unchecked_Access
+ and then Aname /= Name_Unrestricted_Access
then
-- The prefix must be resolvable by itself, without reference to the
-- attribute. One case that requires special handling is a prefix