Bug 11948 – Segfault using the word 'function' as function template parameter

Status
RESOLVED
Resolution
DUPLICATE
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2014-01-19T03:37:00Z
Last change time
2014-02-04T03:52:31Z
Keywords
ice
Assigned to
nobody
Creator
michaelpm394

Comments

Comment #0 by michaelpm394 — 2014-01-19T03:37:18Z
E.g. thing!(function)(); Program received signal SIGSEGV, Segmentation fault. 0x081220c9 in FuncLiteralDeclaration::toCBuffer(OutBuffer*, HdrGenState*) () (gdb) bt #0 0x081220c9 in FuncLiteralDeclaration::toCBuffer(OutBuffer*, HdrGenState*) () #1 0x0809f8f1 in TemplateInstance::toCBufferTiargs(OutBuffer*, HdrGenState*) () #2 0x08063283 in TypeInstance::toCBuffer2(OutBuffer*, HdrGenState*, int) () #3 0x08066cdb in TypeFunction::toCBufferWithAttributes(OutBuffer*, Identifier*, HdrGenState*, TypeFunction*, TemplateDeclaration*) () #4 0x08066e93 in TypeFunction::toCBuffer(OutBuffer*, Identifier*, HdrGenState*) () #5 0x080523a0 in Type::toChars() () #6 0x0807ecea in Parser::parseDeclarations(unsigned long long, unsigned char const*) () #7 0x08070fa8 in Parser::parseDeclDefs(int, Dsymbol**) () #8 0x0807f40d in Parser::parseModule() () #9 0x0804f88c in Module::parse() () #10 0x0804c16f in tryMain(unsigned int, char const**) () #11 0x08049c5b in main ()
Comment #1 by hsteoh — 2014-01-19T08:04:08Z
Confirmed compiler segfault on git HEAD, Linux/64.
Comment #2 by yebblies — 2014-02-04T03:52:31Z
*** This issue has been marked as a duplicate of issue 11982 ***