[Bug 101] New: Pre and Post contracts segfault without -release switch in conjunction with --gc-sections.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Apr 11 07:34:43 PDT 2006


http://d.puremagic.com/bugzilla/show_bug.cgi?id=101

           Summary: Pre and Post contracts segfault without -release switch
                    in conjunction with --gc-sections.
           Product: D
           Version: 0.153
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: godaves at yahoo.com


This code segfaults without the -release switch on Linux. If you link
seperately without the --gc-sections switch, things work fine (ld version
2.15.92.0.2 20040927).

;---

import std.stdio;

int foo(int i)
in
{
    assert(i > 0);
}
body
{
    return i * i;
}

void main()
{
    writefln(foo(0));
}


-- 




More information about the Digitalmars-d-bugs mailing list