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