blob: 949cb836cae3dbc89289fd3db2ba306d150326da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
-- { dg-do run }
-- { dg-options "-O0 -gnata -gnateV" }
with Ada.Exceptions; use Ada.Exceptions;
procedure Valid_Scalars2 is
Traced : Boolean := False;
procedure Trace (E : in Exception_Occurrence) is
pragma Assert (E'Valid_scalars);
begin
Traced := True;
end Trace;
begin
raise Program_Error;
exception
when E : others =>
pragma Assert (E'Valid_scalars);
Trace (E);
if not Traced then
raise Program_Error;
end if;
end Valid_Scalars2;
|