OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gnat.dg/] [loop_optimization5.adb] - Rev 308

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

-- { dg-do compile }
-- { dg-options "-O -gnatp" }
 
with Loop_Optimization5_Pkg; use Loop_Optimization5_Pkg;
 
procedure Loop_Optimization5 is
   Str : constant String := "12345678";
   Cmd : constant String := Init;
   StartP : Positive := Cmd'First;
   StartS : Positive := Cmd'Last + 1;
   EndP   : Natural := StartP - 1;
   Full_Cmd : String_Access;
begin
   for J in StartP .. Cmd'Last - Str'Length + 1 loop
      if Cmd (J .. J + Str'Length - 1) = Str then
         EndP := J - 1;
         exit;
      end if;
   end loop;
   Full_Cmd := Locate (Cmd (StartP .. EndP));
end;
 

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

powered by: WebSVN 2.1.0

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