* [Ada] Fix s-os_lib.adb so vectorizing compilation works
@ 2021-05-05 8:20 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-05-05 8:20 UTC (permalink / raw)
To: gcc-patches; +Cc: Bob Duff
[-- Attachment #1: Type: text/plain, Size: 244 bytes --]
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.
[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 739 bytes --]
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;
-----------------
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-05 8:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-05 8:20 [Ada] Fix s-os_lib.adb so vectorizing compilation works Pierre-Marie de Rodat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).