aboutsummaryrefslogtreecommitdiff
path: root/gcc/d/dmd/dsymbol.d
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/d/dmd/dsymbol.d')
-rw-r--r--gcc/d/dmd/dsymbol.d6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/d/dmd/dsymbol.d b/gcc/d/dmd/dsymbol.d
index c940ff0..7e2d02f 100644
--- a/gcc/d/dmd/dsymbol.d
+++ b/gcc/d/dmd/dsymbol.d
@@ -1544,6 +1544,12 @@ public:
if (flags & IgnoreAmbiguous) // if return NULL on ambiguity
return null;
+
+ /* If two imports from C import files, pick first one, as C has global name space
+ */
+ if (s.isCsymbol() && s2.isCsymbol())
+ continue;
+
if (!(flags & IgnoreErrors))
ScopeDsymbol.multiplyDefined(loc, s, s2);
break;