Bug 22127 – compiler assertion failure parser on UDA and function literal
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-07-18T17:33:09Z
Last change time
2022-01-25T08:31:32Z
Keywords
ice, pull
Assigned to
No Owner
Creator
Basile-z
Comments
Comment #0 by b2.temp — 2021-07-18T17:33:09Z
## test case
```
alias getOne = @(0) function int () => 1;
```
## output
---
ERROR: This is a compiler bug.
Please report it via https://issues.dlang.org/enter_bug.cgi
with, preferably, a reduced, reproducible example and the information below.
DustMite (https://github.com/CyberShadow/DustMite/wiki) can help with the reduction.
---
DMD v2.097.0-151-ga601b03d2-dirty
predefs single_module runnable_module run_single_module DigitalMars LittleEndian D_Version2 all D_SIMD Posix ELFv1 linux CRuntime_Glibc CppRuntime_Gcc D_InlineAsm_X86_64 X86_64 D_LP64 D_PIC assert D_ModuleInfo D_Exceptions D_TypeInfo D_HardFloat
binary dlang/dmd/generated/linux/release/64/dmd
version v2.097.0-151-ga601b03d2-dirty
config dlang/dmd/generated/linux/release/64/dmd.conf
DFLAGS -Idlang/dmd/generated/linux/release/64/../../../../../druntime/import -Idlang/dmd/generated/linux/release/64/../../../../../phobos -L-Ldmd/generated/linux/release/64/../../../../../phobos/generated/linux/release/64 -L--export-dynamic -fPIC
---
core.exception.AssertError@src/dmd/parse.d(4582): Assertion failure
----------------
??:? _d_assertp [0x8ee894]
src/dmd/parse.d:4582 dmd.root.array.Array!(dmd.dsymbol.Dsymbol).Array* dmd.parse.Parser!(dmd.astcodegen.ASTCodegen).Parser.parseDeclarations(bool, dmd.parse.PrefixAttributes!(dmd.astcodegen.ASTCodegen).PrefixAttributes*, const(char)*) [0x75e74d]
src/dmd/parse.d:599 dmd.root.array.Array!(dmd.dsymbol.Dsymbol).Array* dmd.parse.Parser!(dmd.astcodegen.ASTCodegen).Parser.parseDeclDefs(int, dmd.dsymbol.Dsymbol*, dmd.parse.PrefixAttributes!(dmd.astcodegen.ASTCodegen).PrefixAttributes*) [0x754aad]
src/dmd/parse.d:430 dmd.root.array.Array!(dmd.dsymbol.Dsymbol).Array* dmd.parse.Parser!(dmd.astcodegen.ASTCodegen).Parser.parseModule() [0x754602]
src/dmd/dmodule.d:1064 dmd.dmodule.Module dmd.dmodule.Module.parseModule!(dmd.astcodegen.ASTCodegen).parseModule() [0x64249e]
src/dmd/dmodule.d:785 _ZN6Module5parseEv [0x6406b0]
src/dmd/mars.d:394 int dmd.mars.tryMain(ulong, const(char)**, ref dmd.globals.Param) [0x5cab97]
src/dmd/mars.d:1070 _Dmain [0x5cd109]
Comment #1 by dlang-bot — 2021-11-28T08:57:20Z
@WalterBright created dlang/dmd pull request #13368 "fix Issue 22127 - compiler assertion failure parser on UDA and functi…" fixing this issue:
- fix Issue 22127 - compiler assertion failure parser on UDA and function literal
https://github.com/dlang/dmd/pull/13368
Comment #2 by dlang-bot — 2022-01-24T12:03:04Z
@RazvanN7 created dlang/dmd pull request #13566 "Fix Issue 22127 - compiler assertion failure parser on UDA and function literal" fixing this issue:
- Fix Issue 22127 - compiler assertion failure parser on UDA and function literal
https://github.com/dlang/dmd/pull/13566
Comment #3 by dlang-bot — 2022-01-25T08:31:32Z
dlang/dmd pull request #13566 "Fix Issue 22127 - compiler assertion failure parser on UDA and function literal" was merged into stable:
- 5965c0be49c211b2de8751fd6005d1400bcd4cb2 by RazvanN7:
Fix Issue 22127 - compiler assertion failure parser on UDA and function literal
https://github.com/dlang/dmd/pull/13566