https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124310
--- Comment #5 from Liam Powell <liam at liampwll dot com> ---
I was likely wrong about those AIs not being implemented. The below program
accepts the assignment to R and rejects the assignment to A, as the RM says it
should:
pragma Ada_2022;
procedure Example is
type Rec (D : access Integer) is null record;
type Acc is access all Integer;
A : Acc;
begin
declare
X : aliased Integer;
R : Rec := (D => X'Access);
-- (D => new Integer) behaves the same.
begin
A := R.D.all'Access;
end;
end Example;
Something about the built in containers just breaks GNATs analysis here, but I
have no idea what it is. I've tried:
1. Removing Pragma Inline from Reference.
2. Removing Preelaboration and Remote_Types from the package.
3. Replacing Reference_Type with a null record.
Is the fact that Ada.Containers.Ordered_Maps is behaving differently from this
small test case enough to show that something is wrong regarding
3.10.2(12.5/3)?