1--  { dg-do compile }
2--  { dg-options "-gnatwa" }
3
4with Ada.Exceptions;
5procedure Warn25 is
6    CASA_Unavailable : Ada.Exceptions.Exception_Occurrence;
7    use Ada.Exceptions;
8begin
9   while True loop
10    declare
11    begin
12       if Exception_Identity (CASA_Unavailable) = Null_Id then
13         exit;
14     end if;
15     exception
16       when E : others =>
17         Save_Occurrence (Source => E, Target => CASA_Unavailable);
18     end;
19   end loop;
20   if Exception_Identity (CASA_Unavailable) /= Null_Id then
21      Reraise_Occurrence (CASA_Unavailable);
22   end if;
23end;
24