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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gnat.dg/] [loop_optimization5.adb] - Blame information for rev 304

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 304 jeremybenn
-- { dg-do compile }
2
-- { dg-options "-O -gnatp" }
3
 
4
with Loop_Optimization5_Pkg; use Loop_Optimization5_Pkg;
5
 
6
procedure Loop_Optimization5 is
7
   Str : constant String := "12345678";
8
   Cmd : constant String := Init;
9
   StartP : Positive := Cmd'First;
10
   StartS : Positive := Cmd'Last + 1;
11
   EndP   : Natural := StartP - 1;
12
   Full_Cmd : String_Access;
13
begin
14
   for J in StartP .. Cmd'Last - Str'Length + 1 loop
15
      if Cmd (J .. J + Str'Length - 1) = Str then
16
         EndP := J - 1;
17
         exit;
18
      end if;
19
   end loop;
20
   Full_Cmd := Locate (Cmd (StartP .. EndP));
21
end;

powered by: WebSVN 2.1.0

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