www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9209] New: [ICE](symbol.c line 1025) with const struct heap allocation

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

           Summary: [ICE](symbol.c line 1025) with const struct heap
                    allocation
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc



struct Foo(T) { T x; }
void bar(T)(in Foo!T*) {}
void main () {
    const f = new Foo!int(1);
    bar(f);
}


DMD 2.061alpha gives:

Internal error: backend\symbol.c 1025


This is not exactly a regression because this syntax was not allowed in DMD
2.060, but it's a bug not present in DMD 2.060.

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


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice
                 CC|                            |yebblies gmail.com
            Summary|[ICE](symbol.c line 1025)   |ice(symbol.c) with const
                   |with const struct heap      |struct heap allocation
                   |allocation                  |
           Severity|normal                      |critical



Does not need templates:

struct Foo { int x; }
void bar(const Foo*) {}
void main () {
    const f = new Foo(1);
    bar(f);
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 14 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9209


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla digitalmars.com
           Platform|x86                         |All
         OS/Version|Windows                     |All



23:03:06 PDT ---
https://github.com/D-Programming-Language/dmd/pull/1904

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




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

https://github.com/D-Programming-Language/dmd/commit/baa93d923a8386dc8d3d3db43dd17c4115ef8b29
fix Issue 9209 - ice(symbol.c) with const struct heap allocation

https://github.com/D-Programming-Language/dmd/commit/202a28b20900a97d5a13ccbfb5a0be3cf9f28507


fix Issue 9209 - ice(symbol.c) with const struct heap allocation

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 17 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9209


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: -------
Apr 17 2013