diff options
author | Iain Buclaw <ibuclaw@gcc.gnu.org> | 2019-06-16 07:49:30 +0000 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gcc.gnu.org> | 2019-06-16 07:49:30 +0000 |
commit | 87dda41e5a149c802df7b82dfcfe734081ff5f89 (patch) | |
tree | 2c7426346133cba585a7d64ecf3d053e2086b07d /gcc/d | |
parent | e5338b0449f4382594c86ec0f3ea6d9958aeeef5 (diff) | |
download | gcc-87dda41e5a149c802df7b82dfcfe734081ff5f89.zip gcc-87dda41e5a149c802df7b82dfcfe734081ff5f89.tar.gz gcc-87dda41e5a149c802df7b82dfcfe734081ff5f89.tar.bz2 |
re PR d/90762 (ICE in resolvePropertiesX, at d/dmd/expression.c:251)
PR d/90762
d/dmd: Merge upstream dmd b0cd59177
Fixes segmentation fault in resolvePropertiesX.
Reviewed-on: https://github.com/dlang/dmd/pull/10006
From-SVN: r272347
Diffstat (limited to 'gcc/d')
-rw-r--r-- | gcc/d/dmd/MERGE | 2 | ||||
-rw-r--r-- | gcc/d/dmd/statementsem.c | 16 |
2 files changed, 12 insertions, 6 deletions
diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE index 865462d..36f9aa9 100644 --- a/gcc/d/dmd/MERGE +++ b/gcc/d/dmd/MERGE @@ -1,4 +1,4 @@ -d912f4e495412b67f0a2e3b07f645909cfee0212 +b0cd591770fefb4db6eaba89b7a548ef1e980f5c 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/statementsem.c b/gcc/d/dmd/statementsem.c index ccf141e..0dc5e77 100644 --- a/gcc/d/dmd/statementsem.c +++ b/gcc/d/dmd/statementsem.c @@ -3492,12 +3492,18 @@ public: } s->semantic(sc); - Module::addDeferredSemantic2(s); // Bugzilla 14666 - sc->insert(s); - - for (size_t j = 0; j < s->aliasdecls.dim; j++) + // https://issues.dlang.org/show_bug.cgi?id=19942 + // If the module that's being imported doesn't exist, don't add it to the symbol table + // for the current scope. + if (s->mod != NULL) { - sc->insert(s->aliasdecls[j]); + Module::addDeferredSemantic2(s); // Bugzilla 14666 + sc->insert(s); + + for (size_t j = 0; j < s->aliasdecls.dim; j++) + { + sc->insert(s->aliasdecls[j]); + } } } result = imps; |