www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17307] New: [ICE] TypeBasic::implicitConvTo: After error


          Issue ID: 17307
           Summary: [ICE] TypeBasic::implicitConvTo: After error
                    "anonymous struct can only be a part of an aggregate"
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: critical
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: ibuclaw gdcproject.org

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

Apr 08