That's a regression introduced by the rewrite of the finalization machinery,
in the form of dangling references to Master_Node entities remaining in the
tree after the removal of the ignored Ghost code.
gcc/ada/ChangeLog:
* exp_ch7.adb (Process_Transient_In_Scope): Bail out if the object
is an ignored ghost entity.
Obj_Typ : Entity_Id;
begin
+ -- Ignored Ghost objects do not need any cleanup actions because
+ -- they will not appear in the final tree.
+
+ if Is_Ignored_Ghost_Entity (Obj_Id) then
+ return;
+ end if;
+
-- If the object needs to be exported to the outer finalizer,
-- create the declaration of the Master_Node for the object,
-- which will later be picked up by Build_Finalizer.