www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5343] New: dmd crashes by the use of template with -g compiler switch

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

           Summary: dmd crashes by the use of template with -g compiler
                    switch
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: critical
          Priority: P5
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: zan77137 nifty.com



This code crashes dmd at trunk(r795):
---------------
module main;
import std.typecons;

struct S(E)
{
    immutable E x; // Workaround: Remove immutable.
}
enum A{a,b,c}          // Workaround: alias int A;
alias Tuple!(A) TA;    // Workaround: Remove this line.
alias S!(A) SA;        // Workaround: Exchange of declaration order with TA.

void main()
{
}
---------------

Result:
$ dmd -g -run main
(dmd crashes!)

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


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
                 CC|                            |clugdbug yahoo.com.au
           Severity|critical                    |regression



Worked on DMD2.050.

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




Reduces test case:

struct Tuple(Specs...)
{    
    Specs[0] field;
}    

struct S(E)
{
    immutable E x; // Workaround: Remove immutable.
}
enum A{a,b,c}          // Workaround: alias int A;
alias Tuple!(A) TA;    // Workaround: Remove this line.
alias S!(A) SA;        // Workaround: Exchange of declaration order with TA.

void main()
{
}

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




Seems to have just been fixed in svn 798.

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


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED



23:11:19 PST ---
Right, it doesn't happen with the latest source.

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




Because this bug was enbug and this must be fixed by next release, I raised
importance.
Thanks for the swift response.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 12 2010