diff options
author | Iain Buclaw <ibuclaw@gcc.gnu.org> | 2019-06-16 07:47:34 +0000 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gcc.gnu.org> | 2019-06-16 07:47:34 +0000 |
commit | e62b9f8e0881f96c5555b18527041aef4e94a3d1 (patch) | |
tree | 180239084945ad990aea858e5f2b39ec7217a9ff /gcc | |
parent | f45ce17d98fad556e0b534f9a478f5f602c0ad48 (diff) | |
download | gcc-e62b9f8e0881f96c5555b18527041aef4e94a3d1.zip gcc-e62b9f8e0881f96c5555b18527041aef4e94a3d1.tar.gz gcc-e62b9f8e0881f96c5555b18527041aef4e94a3d1.tar.bz2 |
re PR d/90660 (ICE in TypeQualified::resolveHelper, at d/dmd/mtype.c:6738)
PR d/90660
d/dmd: Merge upstream dmd bbc5ea66a
Fixes segmentation fault in TypeQualified::resolveHelper.
Reviewed-on: https://github.com/dlang/dmd/pull/10000
From-SVN: r272339
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/d/dmd/MERGE | 2 | ||||
-rw-r--r-- | gcc/d/dmd/mtype.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/gdc.test/fail_compilation/fail19913.d | 13 |
3 files changed, 18 insertions, 1 deletions
diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE index b81cfc6..9949925 100644 --- a/gcc/d/dmd/MERGE +++ b/gcc/d/dmd/MERGE @@ -1,4 +1,4 @@ -423758078f8fcd945815a5294806915a8a01d392 +bbc5ea66ab41ebd14abd9a0fbb9ca6ef6b2dcb14 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/mtype.c b/gcc/d/dmd/mtype.c index d0e7396..058738e 100644 --- a/gcc/d/dmd/mtype.c +++ b/gcc/d/dmd/mtype.c @@ -6734,6 +6734,10 @@ void TypeQualified::resolveHelper(Loc loc, Scope *sc, goto L3; if (VarDeclaration *v = s->isVarDeclaration()) { + // https://issues.dlang.org/show_bug.cgi?id=19913 + // v->type would be null if it is a forward referenced member. + if (v->type == NULL) + v->semantic(sc); if (v->storage_class & (STCconst | STCimmutable | STCmanifest) || v->type->isConst() || v->type->isImmutable()) { diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19913.d b/gcc/testsuite/gdc.test/fail_compilation/fail19913.d new file mode 100644 index 0000000..b0f31b5 --- /dev/null +++ b/gcc/testsuite/gdc.test/fail_compilation/fail19913.d @@ -0,0 +1,13 @@ +/* PERMUTE_ARGS: + * TEST_OUTPUT: +--- +fail_compilation/fail19913.d(11): Error: no property `b` for type `int` +fail_compilation/fail19913.d(11): Error: mixin `fail19913.S.b!()` is not defined +--- + */ + +struct S +{ + mixin a.b; + enum { a } +} |