OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gnat.dg/] [string_slice.adb] - Blame information for rev 149

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- { dg-do run }
2
-- { dg-options "-O" }
3
 
4
procedure string_slice is
5
 
6
   subtype Key_T is String (1 .. 3);
7
 
8
   function One_Xkey return Key_T is
9
      Key : Key_T := "XXX";
10
   begin
11
      Key (1 .. 2) := "__";
12
      return Key;
13
   end;
14
 
15
   Key : Key_T := One_Xkey;
16
 
17
begin
18
   if Key (3) /= 'X' then
19
      raise Program_Error;
20
   end if;
21
end;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.