Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gnat.dg / aliased2.adb
blob0e1adacd8981e617407ce777826698a4484468b5
1 -- { dg-do run }
3 procedure Aliased2 is
5 type Rec is record
6 Data : access constant String;
7 end record;
9 function Get (S : aliased String) return Rec is
10 R : Rec := (Data => S'Unchecked_Access);
11 begin
12 return R;
13 end;
15 S : aliased String := "Hello";
17 R : Rec := Get (S);
19 begin
20 if R.Data'Length /= S'Length then
21 raise Program_Error;
22 end if;
23 end;