| 1 |
-- { dg-do run } |
| 2 |
|
| 3 |
-- This test requires architecture- and OS-specific support code for unwinding |
| 4 |
-- through signal frames (typically located in *-unwind.h) to pass. Feel free |
| 5 |
-- to disable it if this code hasn't been implemented yet. |
| 6 |
|
| 7 |
procedure Null_Pointer_Deref3 is |
| 8 |
|
| 9 |
pragma Suppress (All_Checks); |
| 10 |
|
| 11 |
procedure Leaf is |
| 12 |
type Int_Ptr is access all Integer; |
| 13 |
function n return Int_Ptr is |
| 14 |
begin return null; end; |
| 15 |
|
| 16 |
Data : Int_Ptr := n; |
| 17 |
begin |
| 18 |
Data.all := 0; |
| 19 |
end; |
| 20 |
|
| 21 |
begin |
| 22 |
Leaf; |
| 23 |
exception |
| 24 |
when others => null; |
| 25 |
end; |