www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17898] New: Segfault in compile with -deps and -unittest


          Issue ID: 17898
           Summary: Segfault in compile with -deps and -unittest
           Product: D
           Version: D2
          Hardware: x86
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: saurabh.das gmail.com

Reported by Dhananjay at
http://forum.dlang.org/post/qpxiduxiddbjkjptbxww forum.dlang.org

Sample program "test.d":

import std.stdio : writeln;
unittest { writeln("Unittest"); }
void main() { writeln("Main"); }

Command: dmd -deps=deps.csv -unittest test.d

Output: Segmentation fault: 11

OS: Mac OS X 10.11.6. Has also been reproduced on linux/x64.

DMD version: 2.076.1

The error goes away if -unittest or -deps is not passed.

Oct 14 2017