c++: prvalue of array type [PR111286]
[official-gcc.git] / gcc / testsuite / gnat.dg / null_pointer_deref3.adb
blobc8e66a6c94aa62407e8ff79de9f75337d98321d8
1 -- { dg-do run }
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.
7 procedure Null_Pointer_Deref3 is
9 pragma Suppress (All_Checks);
11 procedure Leaf is
12 type Int_Ptr is access all Integer;
13 function n return Int_Ptr is
14 begin return null; end;
16 Data : Int_Ptr := n;
17 begin
18 Data.all := 0;
19 end;
21 begin
22 Leaf;
23 exception
24 when others => null;
25 end;