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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gnat.dg/] [boolean_subtype.adb] - Diff between revs 304 and 384

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 304 Rev 384
-- { dg-do compile }
-- { dg-do compile }
-- { dg-options "-O2" }
-- { dg-options "-O2" }
 
 
procedure boolean_subtype is
procedure boolean_subtype is
 
 
   subtype Component_T is Boolean;
   subtype Component_T is Boolean;
 
 
   function Condition return Boolean is
   function Condition return Boolean is
   begin
   begin
      return True;
      return True;
   end;
   end;
 
 
   V : Integer := 0;
   V : Integer := 0;
 
 
   function Component_Value return Integer is
   function Component_Value return Integer is
   begin
   begin
      V := V + 1;
      V := V + 1;
      return V;
      return V;
   end;
   end;
 
 
   Most_Significant  : Component_T := False;
   Most_Significant  : Component_T := False;
   Least_Significant : Component_T := True;
   Least_Significant : Component_T := True;
 
 
begin
begin
 
 
   if Condition then
   if Condition then
      Most_Significant := True;
      Most_Significant := True;
   end if;
   end if;
 
 
   if Condition then
   if Condition then
      Least_Significant := Component_T'Val (Component_Value);
      Least_Significant := Component_T'Val (Component_Value);
   end if;
   end if;
 
 
   if Least_Significant < Most_Significant then
   if Least_Significant < Most_Significant then
      Least_Significant := Most_Significant;
      Least_Significant := Most_Significant;
   end if;
   end if;
 
 
   if Least_Significant /= True then
   if Least_Significant /= True then
      raise Program_Error;
      raise Program_Error;
   end if;
   end if;
 
 
end;
end;
 
 

powered by: WebSVN 2.1.0

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