[Issue 7709] New: Segfault when trying to use any property of an AA, which is the return type of a CTFE function with inout parameters.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Mar 14 12:54:48 PDT 2012


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

           Summary: Segfault when trying to use any property of an AA,
                    which is the return type of a CTFE function with inout
                    parameters.
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: CTFE, ice
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: kennytm at gmail.com


--- Comment #0 from kennytm at gmail.com 2012-03-14 12:54:59 PDT ---
Test case 1 (expected compilable):
--------------------------------------------
inout(int[int]) test7709a(inout(int) bb) {
    int[int] r;
    r.keys;
    return null;
}
static assert(null == test7709a(2));
--------------------------------------------


Test case 2 (expected failure):
--------------------------------------------
inout(int[int]) test7709b(inout(int) bb) {
    int[int] r;
    r.sadjalsdjasldjasjs;
    return null;
}
static assert(null == test7709b(2));
--------------------------------------------


Both test cases cause segfault at template.c:4428 (TemplateInstance::semantic)
because 'sc' is null.

-- 
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