www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1002] New: debug statement crashes at compile-time function execution

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1002

           Summary: debug statement crashes at compile-time function
                    execution
           Product: D
           Version: 1.007
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: hasan.aljudy gmail.com


debug statement inside a function will crash the compiler if it tries to
execute the function at compile time.

sample code:
---------------
dchar[] testd( dchar[] input )
{
        debug int x = 10; // take this line off and it won't crash, or just
take off the debug specification
        return "my";
}

void main()
{   
        static x = testd( "hello" );
}
---------------------


-- 
Feb 23 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1002


thomas-dloop kuehne.cn changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         OS/Version|Windows                     |All





Added to DStress as
http://dstress.kuehne.cn/run/d/debug_14_A.d


-- 
Feb 26 2007
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1002


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME





Works in DMD 1.013


-- 
Apr 20 2007