Preserving locations for variable-uses and constants (PR c++/43486)
[official-gcc.git] / gcc / testsuite / gnat.dg / null_pointer_deref3.adb
blobf92242e7e6795c0e15970918535a02a4980b1e14
1 -- { dg-do run }
2 -- { dg-options "-O -gnatp" }
4 -- This test requires architecture- and OS-specific support code for unwinding
5 -- through signal frames (typically located in *-unwind.h) to pass. Feel free
6 -- to disable it if this code hasn't been implemented yet.
8 procedure Null_Pointer_Deref3 is
10 procedure Leaf is
11 type Int_Ptr is access all Integer;
12 function n return Int_Ptr is
13 begin return null; end;
15 Data : Int_Ptr := n;
16 begin
17 Data.all := 0;
18 end;
20 begin
21 Leaf;
22 exception
23 when others => null;
24 end;