]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Fix s-os_lib.adb so vectorizing compilation works
authorBob Duff <duff@adacore.com>
Tue, 12 Jan 2021 18:25:07 +0000 (13:25 -0500)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 5 May 2021 08:19:03 +0000 (04:19 -0400)
gcc/ada/

* libgnat/s-os_lib.adb (Missed_Drive_Letter): Simplify the code.

gcc/ada/libgnat/s-os_lib.adb

index 592d04bd39c21d56c512403774b48bf6cb1268d4..5c02b2d5239a428465db36b367ab8f124bc71372 100644 (file)
@@ -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;
 
       -----------------