OSDN Git Service

./:
[pf3gnuchains/gcc-fork.git] / gcc / ada / sem_elim.adb
index f5200ca..f7b8c1a 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1997-2004 Free Software Foundation, Inc.          --
+--          Copyright (C) 1997-2007, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -16,8 +16,8 @@
 -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
 -- for  more details.  You should have  received  a copy of the GNU General --
 -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
--- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
--- MA 02111-1307, USA.                                                      --
+-- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
+-- Boston, MA 02110-1301, USA.                                              --
 --                                                                          --
 -- GNAT was originally developed  by the GNAT team at  New York University. --
 -- Extensive contributions were provided by Ada Core Technologies Inc.      --
@@ -218,7 +218,7 @@ package body Sem_Elim is
 
    package Elim_Entities is new Table.Table (
      Table_Component_Type => Elim_Entity_Entry,
-     Table_Index_Type     => Name_Id,
+     Table_Index_Type     => Name_Id'Base,
      Table_Low_Bound      => First_Name_Id,
      Table_Initial        => 50,
      Table_Increment      => 200,
@@ -521,14 +521,14 @@ package body Sem_Elim is
                         if Get_Physical_Line_Number (P) =
                            Physical_Line_Number (N)
                         then
-                           while Sloc_Trace (Idx) /= '['
-                               and then Idx <= Last
+                           while Idx <= Last and then
+                              Sloc_Trace (Idx) /= '['
                            loop
                               Idx := Idx + 1;
                            end loop;
 
-                           if Sloc_Trace (Idx) = '['
-                             and then Idx < Last
+                           if Idx <= Last and then
+                             Sloc_Trace (Idx) = '['
                            then
                               Idx := Idx + 1;
                               Idx := Skip_Spaces;