[Issue 17918] [Reg 2.072] ICE with unknown symbol in base class

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Oct 26 15:13:28 UTC 2017


https://issues.dlang.org/show_bug.cgi?id=17918

Martin Nowak <code at dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice, ice-on-invalid-code
           Priority|P3                          |P2
                 CC|                            |code at dawg.eu
            Summary|Segmentation fault dmd      |[Reg 2.072] ICE with
                   |failed with exit code 139.  |unknown symbol in base
                   |                            |class
           Severity|regression                  |critical

--- Comment #5 from Martin Nowak <code at dawg.eu> ---
cat > a.d << CODE
class Base
{
    auto byNode()
    {
        return _listMap;
    }
}
CODE
cat > b.d << CODE
import a;

class Derived : Base
{
}
CODE
dmd -c b.d
----
a.d(5): Error: undefined identifier _listMap
Segmentation fault
----
#0  0x00000000007280f5 in totym(Type*) ()
#1  0x00000000007231c8 in ToCtypeVisitor::visit(Type*) ()
#2  0x00000000007018ea in Visitor::visit(TypeError*) ()
#3  0x0000000000698949 in TypeError::accept(Visitor*) ()
#4  0x000000000072df3a in toSymbol::ToSymbol::visit(FuncDeclaration*) ()
#5  0x000000000062b5b9 in FuncDeclaration::accept(Visitor*) ()
#6  0x000000000072d46f in toSymbol(Dsymbol*) ()
#7  0x0000000000736cd2 in toObjFile::ToObjFile::visit(ClassDeclaration*) ()
#8  0x000000000056c30d in ClassDeclaration::accept(Visitor*) ()
#9  0x0000000000735e23 in toObjFile(Dsymbol*, bool) ()
#10 0x000000000072527f in genObjFile(Module*, bool) ()
#11 0x000000000068c371 in ddmd.mars.tryMain(ulong, const(char)**) ()
#12 0x000000000068cdaf in D main ()
----

Changed severity from regression to major as this was always an ICE.
The difference between version in the example from comment 4, comes from map no
longer being importable from std.algorithm.

--


More information about the Digitalmars-d-bugs mailing list