Skip to content

Commit

Permalink
PR d/90660
Browse files Browse the repository at this point in the history
d/dmd: Merge upstream dmd bbc5ea66a

Fixes segmentation fault in TypeQualified::resolveHelper.

Reviewed-on: dlang/dmd#10000

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@272339 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
ibuclaw committed Jun 16, 2019
1 parent 41d384c commit feb0e6d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gcc/d/dmd/MERGE
Original file line number Diff line number Diff line change
@@ -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.
4 changes: 4 additions & 0 deletions gcc/d/dmd/mtype.c
Original file line number Diff line number Diff line change
Expand Up @@ -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())
{
Expand Down
13 changes: 13 additions & 0 deletions gcc/testsuite/gdc.test/fail_compilation/fail19913.d
Original file line number Diff line number Diff line change
@@ -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 }
}

0 comments on commit feb0e6d

Please sign in to comment.