March 14, 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@puremagic.com
        ReportedBy: kennytm@gmail.com


--- Comment #0 from kennytm@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: -------
March 15, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7709


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug@yahoo.com.au


--- Comment #1 from Don <clugdbug@yahoo.com.au> 2012-03-15 03:13:51 PDT ---
Duplicate of bug 7602?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 15, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7709



--- Comment #2 from kennytm@gmail.com 2012-03-15 03:35:33 PDT ---
(In reply to comment #1)
> Duplicate of bug 7602?

I don't think so (at least on the surface). This variant of 7602 works (as
described in 7602's title):
--------------------------------------
string[] test7602b()
{
    int[string] array = ["2": 3];
    return array.keys;
}
enum str = test();
--------------------------------------

But this variant of 7709 fails:
--------------------------------------
inout(int[int]) test7709c(inout(int) bb)
{
    int[int] arr = [1: 2];
    arr.keys;
    return null;
}
enum str = test7709c(2);
--------------------------------------

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 30, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7709



--- Comment #3 from Don <clugdbug@yahoo.com.au> 2012-03-30 06:31:43 PDT ---
Works now, on git head. I don't think this had anything to do with CTFE.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 21, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7709


SomeDude <lovelydear@mailmetrash.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lovelydear@mailmetrash.com


--- Comment #4 from SomeDude <lovelydear@mailmetrash.com> 2012-04-21 06:50:05 PDT ---
Works with 2.059

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 30, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7709


Don <clugdbug@yahoo.com.au> changed:

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


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Top | Discussion index | About this forum | D home