[Issue 6295] New: DMD 2.054 segfaults

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jul 12 09:52:32 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=6295

           Summary: DMD 2.054 segfaults
           Product: D
           Version: D2
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: puneet at coverify.org


--- Comment #0 from Puneet Goel <puneet at coverify.org> 2011-07-12 09:47:22 PDT ---
Here is a reduced test case. Compiles and runs fine with dmd-2.053, segfaults
at compile stage for dmd 1.054. Compiles and runs fine with dmd-2.054 if I take
out "size_t N" template parameter. Also compiles fine with 2.054 if printFoo is
defined outside the main function.

import std.stdio;
struct Foo(IF, size_t N) {}
interface Bar {}
void main() {
  void printFoo(T: Foo!(IF, N), IF, size_t N)(T foo)
    if(is(IF == interface)) {
    writeln("Type: ", T.stringof);
  }
  Foo!(Bar, 1) foo;
  printFoo(foo);
}

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


More information about the Digitalmars-d-bugs mailing list