www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7890] New: [CTFE] - segfault for struct literal with AA field

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

           Summary: [CTFE] - segfault for struct literal with AA field
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: dawg dawgfoto.de



cat > bug.d << CODE
struct Foo
{
    int[int] tab;
}

Foo ctfe()
{
    Foo foo;
    foo.tab[0] = 0;
    return foo;
}

enum f = ctfe();
CODE

dmd -c bug

--------

The segfault happens during the hasNonConstPointers check
for the enum initializer. At that point the tab field type
is 'int' instead of 'int[int]'.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 11 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7890


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice, pull



https://github.com/D-Programming-Language/dmd/pull/1348

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 04 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7890




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/cb832187045782c786148db9a0bc19ace073a291
Fix issue 7890 [CTFE] - segfault for struct literal with AA field

The type of the AA was set incorrectly. When expression is x[n]=y, type of the
AA
is x, not x[n].

https://github.com/D-Programming-Language/dmd/commit/094ea6ebfabc3c2d7dd1bda39b04e2a3f2309140


Fix issue 7890 [CTFE] - segfault for struct literal with AA field

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 04 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7890


Kenji Hara <k.hara.pg gmail.com> 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: -------
Dec 04 2012