D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 16434 - dmd assertion failure in declaration.d
Summary: dmd assertion failure in declaration.d
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 regression
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-27 11:28 UTC by John Colvin
Modified: 2017-02-08 08:02 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description John Colvin 2016-08-27 11:28:58 UTC
% tree                                                                                              :(
.
└── D
    └── E
        ├── F.d
        └── I.d

2 directories, 2 files
% cat D/E/F.d
module H;
import D.E.I;

struct K
{
    L* M;
}

struct N
{
    K O;
    P Q;
}

% cat D/E/I.d
module D.E.I;
alias P = long;

% dmd D/E/I.d D/E/F.d 
D/E/F.d(6): Error: undefined identifier 'L'
core.exception.AssertError@declaration.d(2061): Assertion failure
----------------
4   dmd                                 0x00000001097b7854 _d_assert + 104
5   dmd                                 0x000000010958c86a void ddmd.declaration.__assert(int) + 38
6   dmd                                 0x00000001095c36e1 _ZN14VarDeclaration16isOverlappedWithEPS_ + 81
7   dmd                                 0x0000000109590c0c _ZN20AggregateDeclaration21checkOverlappedFieldsEv + 316
8   dmd                                 0x00000001095ec1ca _ZN17StructDeclaration12finalizeSizeEv + 330
9   dmd                                 0x0000000109590a0d _ZN20AggregateDeclaration13determineSizeE3Loc + 221
10  dmd                                 0x00000001095903e9 _ZN20AggregateDeclaration9semantic2EP5Scope + 89
11  dmd                                 0x00000001095e1ab1 _ZN6Module9semantic2EP5Scope + 113
12  dmd                                 0x0000000109665d2c int ddmd.mars.tryMain(ulong, const(char)**) + 13348
13  dmd                                 0x000000010958d8d2 _Dmain + 38
14  dmd                                 0x00000001097c838b D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv + 39
15  dmd                                 0x00000001097c82bf void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) + 35
16  dmd                                 0x00000001097c8330 void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() + 44
17  dmd                                 0x00000001097c82bf void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) + 35
18  dmd                                 0x00000001097c8225 _d_run_main + 497
19  dmd                                 0x000000010958d96b main + 15
20  dmd                                 0x000000010958bf13 start + 51
21  ???                                 0x0000000000000002 0x0 + 2
Comment 1 Andrej Mitrovic 2016-08-28 13:01:01 UTC
Please specify the version of the compiler and the platform you're running it on.
Comment 2 John Colvin 2016-08-28 13:19:44 UTC
dmd git HEAD as of a few days ago (fe0ab0df5cfe4aa9c1ec4ea140e5521767e28df5)
Comment 3 John Colvin 2016-08-28 13:20:23 UTC
OS X, but also tested on linux
Comment 4 Walter Bright 2016-10-13 23:05:42 UTC
I get the error message, but no assert.
Comment 5 Walter Bright 2017-02-08 08:02:02 UTC
Can't reproduce it. Please reopen if it can be reproduced in HEAD.