Fix s-os_lib.adb so vectorizing compilation works.  Without this, the
compiler crashes while compiling s-os_lib.adb.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

        * libgnat/s-os_lib.adb (Missed_Drive_Letter): Simplify the code.
diff --git a/gcc/ada/libgnat/s-os_lib.adb b/gcc/ada/libgnat/s-os_lib.adb
--- a/gcc/ada/libgnat/s-os_lib.adb
+++ b/gcc/ada/libgnat/s-os_lib.adb
@@ -2158,8 +2158,10 @@ package body System.OS_Lib is
          return On_Windows
            and then not Is_With_Drive (Name)
            and then (Name'Length < 2 -- not \\name case
-                     or else Name (Name'First .. Name'First + 1)
-                             /= Directory_Separator & Directory_Separator);
+                     or else Name (Name'First)
+                             /= Directory_Separator
+                     or else Name (Name'First + 1)
+                             /= Directory_Separator);
       end Missed_Drive_Letter;
 
       -----------------


Reply via email to