This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH PR d/91339] Committed merge with upstream dmd b37a537d3


Hi,

This patch merges the dmd frontend implementation with upstream dmd b37a537d3.

Fixes PR d/91339, in which an error: cannot find source code for
runtime library file 'object.d' occurred when the path contained a
'~'.

Bootstrapped and regression tested the D testsuite on x86_64-linux-gnu.

Committed to trunk as r274771.

--
Iain
---
diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE
index cb7b6bfac7f..578f3fc0309 100644
--- a/gcc/d/dmd/MERGE
+++ b/gcc/d/dmd/MERGE
@@ -1,4 +1,4 @@
-375ed10aa7eb28755f92775ca5c5399550cd100b
+b37a537d36c2ac69afa505a3110e2328c9fc0114
 
 The first line of this file holds the git revision number of the last
 merge done from the dlang/dmd repository.
diff --git a/gcc/d/dmd/root/filename.c b/gcc/d/dmd/root/filename.c
index 6144d810fb5..ad6b1148c7b 100644
--- a/gcc/d/dmd/root/filename.c
+++ b/gcc/d/dmd/root/filename.c
@@ -110,7 +110,8 @@ Strings *FileName::splitPath(const char *path)
                     case '~':
                     {
                         char *home = getenv("HOME");
-                        if (home)
+                        // Expand ~ only if it is prefixing the rest of the path.
+                        if (!buf.offset && p[1] == '/' && home)
                             buf.writestring(home);
                         else
                             buf.writestring("~");

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]