Debian Codegraph @

gcc/testsuite/gnat.dg/null_pointer_deref1.adb

raw
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_Deref1 is
8
9 pragma Suppress (All_Checks);
10
11 type Int_Ptr is access all Integer;
12
13 function Ident return Int_Ptr is
14 begin
15 return null;
16 end;
17
18 Data : Int_Ptr := Ident;
19 begin
20 Data.all := 1;
21 exception
22 when others => null;
23 end;