Bug 17307 – [REG2.072.0][ICE] TypeBasic::implicitConvTo: After error "anonymous struct can only be a part of an aggregate"

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-04-08T12:17:53Z
Last change time
2018-12-21T05:29:46Z
Assigned to
No Owner
Creator
Iain Buclaw
See also
https://issues.dlang.org/show_bug.cgi?id=16607

Comments

Comment #0 by ibuclaw — 2017-04-08T12:17:53Z
Reduced test --- struct { enum bitsPerWord = size_t; } --- $ dmd bug.d DMD v2.074.0-devel-880aeae DEBUG bug.d(1): Error: anonymous struct can only be a part of an aggregate, not module bug Segmentation fault --- Program received signal SIGSEGV, Segmentation fault. 0x00000000005eb148 in TypeBasic::implicitConvTo(Type*) (this=0x7ffff7ec9460, to=0x0) at ddmd/mtype.d:4168 (gdb) bt #0 0x00000000005eb148 in TypeBasic::implicitConvTo(Type*) (this=0x7ffff7ec9460, to=0x0) at ddmd/mtype.d:4168 #1 0x000000000051eb65 in implicitConvTo::ImplicitConvTo::visit(Expression*) (this=0x7fffffffce90, e=0x7ffff6979f80) at ddmd/dcast.d:217 #2 0x000000000062a19e in Visitor::visit(TypeExp*) (this=0x7fffffffce90, e=0x7ffff6979f80) at ddmd/visitor.d:849 #3 0x000000000058b8b6 in TypeExp::accept(Visitor*) (this=0x7ffff6979f80, v=0x7fffffffce90) at ddmd/expression.d:5693 #4 0x000000000051ea57 in implicitConvTo(Expression*, Type*) (e=0x7ffff6979f80, t=0x0) at ddmd/dcast.d:1388 #5 0x00000000005848a9 in Expression::implicitConvTo(Type*) (this=0x7ffff6979f80, t=0x0) at ddmd/expression.d:2824 #6 0x00000000005ce9e2 in ExpInitializer::semantic(Scope*, Type*, NeedInterpret) (this=0x7ffff7eccc60, sc=0x7ffff6978de0, t=0x0, needInterpret=<incomplete type>) at ddmd/init.d:883 #7 0x00000000005339db in VarDeclaration::semantic2(Scope*) (this=0x7ffff7eccc90, sc=0x7ffff6978de0) at ddmd/declaration.d:1955 #8 0x0000000000503204 in AttribDeclaration::semantic2(Scope*) (this=0x7ffff7eccdb0, sc=0x7ffff6978de0) at ddmd/attrib.d:191 #9 0x0000000000553e69 in Module::semantic2(Scope*) (this=0x7ffff7ecc870, _param_0=0x0) at ddmd/dmodule.d:1082 #10 0x00000000005e266e in ddmd.mars.tryMain(ulong, const(char)**) (argv=0x7fffffffddd8, argc=2) at ddmd/mars.d:1472 #11 0x00000000005e3503 in D main () at ddmd/mars.d:1718
Comment #1 by dlang-bugzilla — 2017-07-03T00:12:34Z
This appears to be a regression. Introduced in https://github.com/dlang/dmd/pull/5500
Comment #2 by bugzilla — 2017-10-09T23:16:16Z
Comment #3 by github-bugzilla — 2017-10-11T21:41:26Z
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/0cd20c350681eee7e94483564d86f37a1d3d0b85 Fix Issue 17307 - [REG2.072.0][ICE] TypeBasic::implicitConvTo: https://github.com/dlang/dmd/commit/bf5a755cb6a1d4b5552263c7961effab6f8c6ea0 Merge pull request #7199 from JinShil/fix_17307 Fix Issue 17307 - [REG2.072.0][ICE] TypeBasic::implicitConvTo
Comment #4 by github-bugzilla — 2017-10-16T06:37:41Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/0cd20c350681eee7e94483564d86f37a1d3d0b85 Fix Issue 17307 - [REG2.072.0][ICE] TypeBasic::implicitConvTo: https://github.com/dlang/dmd/commit/bf5a755cb6a1d4b5552263c7961effab6f8c6ea0 Merge pull request #7199 from JinShil/fix_17307