D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 17275 - [REG 2.072.0] AssertError@declaration.d(2121): Assertion failure
Summary: [REG 2.072.0] AssertError@declaration.d(2121): Assertion failure
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 regression
Assignee: No Owner
URL:
Keywords: ice
Depends on:
Blocks:
 
Reported: 2017-03-25 11:14 UTC by Iain Buclaw
Modified: 2017-08-07 13:15 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Iain Buclaw 2017-03-25 11:14:21 UTC
Introduced by: https://github.com/dlang/dmd/pull/6065

Reduced:
---
struct DSO
{
    inout(ModuleGroup) moduleGroup() { }
}

struct ThreadDSO
{
    DSO* _pdso;
    void[] _tlsRange;
}
---

Causes assertion failure:
```
sections.d(3): Error: undefined identifier 'ModuleGroup', did you mean function 'moduleGroup'?
sections.d(3): Error: inout on return means inout must be on a parameter as well for inout(ModuleGroup)()
core.exception.AssertError@declaration.d(2121): Assertion failure
----------------
??:? _d_assert [0x705b70]
??:? void ddmd.declaration.__assert(int) [0x52b962]
??:? bool VarDeclaration::isOverlappedWith(VarDeclaration*) [0x52a0f5]
??:? bool AggregateDeclaration::checkOverlappedFields() [0x4f71c8]
??:? void StructDeclaration::finalizeSize() [0x55366e]
??:? bool AggregateDeclaration::determineSize(Loc) [0x4f6fb9]
??:? void AggregateDeclaration::semantic2(Scope*) [0x4f6995]
??:? void Module::semantic2(Scope*) [0x54899d]
??:? int ddmd.mars.tryMain(ulong, const(char)**) [0x5cf4b4]
??:? _Dmain [0x5d0222]
??:? _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x707a17]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x707943]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() [0x7079bc]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x707943]
??:? _d_run_main [0x7078a7]
??:? main [0x5d09c3]
??:? __libc_start_main [0xd137882f]
```
Comment 1 Walter Bright 2017-04-12 04:38:52 UTC
https://github.com/dlang/dmd/pull/6690
Comment 2 github-bugzilla 2017-04-12 19:05:02 UTC
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/3a24d037f5d38bd7e751636e5a3adb73211c966e
fix Issue 17275 - [REG 2.072.0] AssertError@declaration.d(2121): Assertion failure

https://github.com/dlang/dmd/commit/15b3ee1603b7dcc0317ba63c54f77ee9718f90e4
Merge pull request #6690 from WalterBright/fix17275

fix Issue 17275 - [REG 2.072.0] AssertError@declaration.d(2121): Asse…
Comment 3 Iain Buclaw 2017-04-20 20:58:08 UTC
This is not fixed.

---
$ ./src/dmd test/fail_compilation/fail17275.d
test/fail_compilation/fail17275.d(5): Error: undefined identifier 'ModuleGroup', did you mean function 'moduleGroup'?
test/fail_compilation/fail17275.d(5): Error: inout on return means inout must be on a parameter as well for inout(ModuleGroup)()
core.exception.AssertError@ddmd/argtypes.d(201): Assertion failure
----------------
??:? _d_assert [0x72bdb4]
??:? void ddmd.argtypes.__assert(int) [0x510ff2]
??:? Type* toArgTypes::ToArgTypes::argtypemerge(Type*, Type*, unsigned int) [0x5106ce]
??:? void toArgTypes::ToArgTypes::visit(TypeStruct*) [0x510dae]
??:? void TypeStruct::accept(Visitor*) [0x5f3830]
??:? TypeTuple* toArgTypes(Type*) [0x5102b9]
??:? void StructDeclaration::finalizeSize() [0x56b414]
??:? bool AggregateDeclaration::determineSize(Loc) [0x50e659]
??:? void AggregateDeclaration::semantic2(Scope*) [0x50dff5]
??:? void Module::semantic2(Scope*) [0x56067d]
??:? int ddmd.mars.tryMain(ulong, const(char)**) [0x5dfa4b]
??:? _Dmain [0x5e09b2]
??:? _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x72dc5b]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x72db87]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() [0x72dc00]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x72db87]
??:? _d_run_main [0x72daeb]
??:? main [0x5e1153]
??:? __libc_start_main [0xb2a6282f]
Comment 4 Walter Bright 2017-05-30 03:26:25 UTC
https://github.com/dlang/dmd/pull/6845
Comment 5 Walter Bright 2017-06-09 09:11:31 UTC
https://github.com/dlang/dmd/pull/6875
Comment 6 github-bugzilla 2017-06-11 06:28:44 UTC
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/d46fcde6214ab49cefc0c3ed2e24059f356dd429
fix Issue 17275 - [REG 2.072.0] AssertError@declaration.d(2121): Assertion failure

https://github.com/dlang/dmd/commit/cb61805ebf04b7e27e18ca5ad98fae39d8a9a2f6
Merge pull request #6875 from WalterBright/fix17275-2

fix Issue 17275 - [REG 2.072.0] AssertError@declaration.d(2121): Asse…
merged-on-behalf-of: Walter Bright <WalterBright@users.noreply.github.com>
Comment 8 github-bugzilla 2017-08-07 13:15:43 UTC
Commits pushed to newCTFE at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/3a24d037f5d38bd7e751636e5a3adb73211c966e
fix Issue 17275 - [REG 2.072.0] AssertError@declaration.d(2121): Assertion failure

https://github.com/dlang/dmd/commit/15b3ee1603b7dcc0317ba63c54f77ee9718f90e4
Merge pull request #6690 from WalterBright/fix17275

https://github.com/dlang/dmd/commit/d46fcde6214ab49cefc0c3ed2e24059f356dd429
fix Issue 17275 - [REG 2.072.0] AssertError@declaration.d(2121): Assertion failure

https://github.com/dlang/dmd/commit/cb61805ebf04b7e27e18ca5ad98fae39d8a9a2f6
Merge pull request #6875 from WalterBright/fix17275-2