[Issue 11487] New: dmd segfaults on writefln in nested template

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Nov 9 12:20:18 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11487

           Summary: dmd segfaults on writefln in nested template
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: ellery-newcomer at utulsa.edu


--- Comment #0 from Ellery Newcomer <ellery-newcomer at utulsa.edu> 2013-11-09 12:20:17 PST ---
the code:
import std.stdio;

template Sequenced() {
    template Inner( ) {
        struct SequencedRange(bool is_const) {
            MultiIndexContainer c;
            ~this() {
                writefln("c=%x",c);
            }
        }
        template IndexMixin( alias Range_0){
            Range_0!false SeqRange;
            @property front() inout{
            }
        }
    }
}

class MultiIndexContainer
{
    alias Sequenced!().Inner!() M0;
    mixin M0.IndexMixin!(M0.SequencedRange) ;
}

the compile:

dmd test_sequenced.d

the fireworks:

Segmentation fault (core dumped)

linux, 64 bit, happens on dmd 2.063 and 2.064

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list