[Issue 14240] New: Segfault while compiling templated code
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Mar 3 10:22:12 PST 2015
https://issues.dlang.org/show_bug.cgi?id=14240
Issue ID: 14240
Summary: Segfault while compiling templated code
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: lord_sigma at live.de
Created attachment 1479
--> https://issues.dlang.org/attachment.cgi?id=1479&action=edit
GDB's backtrace
Dustmited source:
-----
// A.d
struct C(string E ) {}
import std.typetuple;
alias I = TypeTuple!(C!K);
enum K = M;
-----
DMD version 2.066 and git crash on my system whenever I try to run dmd A.d .
GDB's backtrace:
#0 0x00000000004713da in ctfeInterpret(Expression*) ()
#1 0x000000000044e4b9 in TemplateValueParameter::matchArg(Scope*, RootObject*,
unsigned long, Array<TemplateParameter*>*, Array<RootObject*>*, Declaration**)
()
#2 0x000000000045715e in TemplateDeclaration::matchWithInstance(Scope*,
TemplateInstance*, Array<RootObject*>*, Array<Expression*>*, int) ()
#3 0x000000000045784d in TemplateInstance::findBestMatch(Scope*,
Array<Expression*>*)::ParamBest::fp(void*, Dsymbol*) ()
#4 0x00000000004f2ce6 in overloadApply(Dsymbol*, void*, int (*)(void*,
Dsymbol*)) ()
#5 0x0000000000457c97 in TemplateInstance::findBestMatch(Scope*,
Array<Expression*>*) ()
#6 0x000000000045c7b9 in TemplateInstance::semantic(Scope*,
Array<Expression*>*) ()
#7 0x0000000000419c54 in TypeInstance::resolve(Loc, Scope*, Expression**,
Type**, Dsymbol**, bool) ()
#8 0x0000000000455ea0 in TemplateInstance::semanticTiargs(Loc, Scope*,
Array<RootObject*>*, int) ()
#9 0x0000000000456a2e in TemplateInstance::semanticTiargs(Scope*) [clone
.part.55] ()
#10 0x000000000045ca1b in TemplateInstance::semantic(Scope*,
Array<Expression*>*) ()
#11 0x0000000000419c54 in TypeInstance::resolve(Loc, Scope*, Expression**,
Type**, Dsymbol**, bool) ()
#12 0x0000000000409f4d in TypeInstance::toDsymbol(Scope*) ()
#13 0x00000000004c126e in AliasDeclaration::semantic(Scope*) ()
#14 0x0000000000407c65 in Module::semantic() ()
#15 0x0000000000404e5c in tryMain(unsigned long, char const**) ()
#16 0x00007ffff7015ab5 in __libc_start_main () from /lib64/libc.so.6
#17 0x0000000000402cf5 in _start ()
--
More information about the Digitalmars-d-bugs
mailing list