--  A null check of an access-to-subprogram value left in the code (`--no-prove`): its
--  operands are pointers in the checks' wide mode too
package P is
   type Pair is limited private;
   type Reader is access function (X : Pair) return Natural;
   function Model (X : Pair) return Natural with Ghost;
   function First (X : Pair) return Natural;
   procedure Show (X : Pair; R : not null Reader);
private
   type Ptr is access Integer;
   type Pair is limited record
      A, B : Natural := 0;
      Head : Ptr;
   end record
     with Type_Invariant => Pair.A < 10;

   function Model (X : Pair) return Natural is (X.A);
   function First (X : Pair) return Natural is (X.A);
end P;
