Thread overview
[Issue 8283] New: backend/cod1.c 1677, related to structs with constructors (?)
Jun 22, 2012
klickverbot
Jun 30, 2012
klickverbot
[Issue 8283] ICE(cod1.c): returning struct with constructor as member of another struct
Jul 16, 2012
Don
Jul 22, 2012
Walter Bright
June 22, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8283

           Summary: backend/cod1.c 1677, related to structs with
                    constructors (?)
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: code@klickverbot.at


--- Comment #0 from klickverbot <code@klickverbot.at> 2012-06-22 08:46:53 PDT ---
The following test case was reduced from code passing a core.time.Duration using std.concurrency:
---
struct Foo {
    this(long) {}
}

struct FooContainer {
    Foo value;
}

auto get() {
    union Buf { FooContainer result; }
    Buf buf = {};
    return buf.result;
}

void writerThread() {
    auto a = get();
}
---

DMD 3bfac139 (on OS X) fails with: Internal error: backend/cod1.c 1677


In the original much larger test case, the error was different, although probably related (I'll re-test it once this version has been addressed):
---
el:0x1008c5d70 cnt=0 cs=0 call  8 TYstruct 0x1008a27d0 0x1008aad70
 el:0x1008a27d0 cnt=0 cs=0 var  TYD func
_D3std7variant17__T8VariantNVm32Z8VariantN37__T3getTS4file20FlushIntervalMessageZ3getMFNdNeZS4file20FlushIntervalMessage
 el:0x1008aad70 cnt=0 cs=0 +  TY* 0x1008c6a30 0x1008aabf0
  el:0x1008c6a30 cnt=1 cs=0 var  TY*  this
  el:0x1008aabf0 cnt=0 cs=0 const  TYuns long long 8LL
Internal error: backend/cod1.c 3235
---

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


klickverbot <code@klickverbot.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |simendsjo@gmail.com


--- Comment #1 from klickverbot <code@klickverbot.at> 2012-06-30 13:05:46 PDT ---
*** Issue 8327 has been marked as a duplicate of this issue. ***

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


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice
                 CC|                            |clugdbug@yahoo.com.au
            Summary|backend/cod1.c 1677,        |ICE(cod1.c): returning
                   |related to structs with     |struct with constructor as
                   |constructors (?)            |member of another struct


--- Comment #2 from Don <clugdbug@yahoo.com.au> 2012-07-16 02:00:26 PDT ---
Reduced test case. Bug8283 can be either a struct or a union.
---------------------------
struct Ctor8283 {
    this(int n) {}
}

struct Bug8283 {
    Ctor8283 value;
}

Bug8283 get8283() {
    Bug8283 buf;
    return buf;
}

void outer8283() {
    Bug8283 x = get8283();
}

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



--- Comment #3 from github-bugzilla@puremagic.com 2012-07-21 22:06:36 PDT ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/20083aa60aa612d89045eaad7cd8bdeb56b75bba
fix Issue 8283 - ICE(cod1.c): returning struct with constructor as member of
another struct

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



--- Comment #4 from github-bugzilla@puremagic.com 2012-07-21 22:08:34 PDT ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/b16facabf3289ac2adc6a705f15a70decde05560 test case for Issue 8283

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


Walter Bright <bugzilla@digitalmars.com> changed:

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


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



--- Comment #5 from github-bugzilla@puremagic.com 2012-07-21 22:12:01 PDT ---
Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/68fa19e2cae1ae8c6799fb58e45b43e096f73ede
fix Issue 8283 - ICE(cod1.c): returning struct with constructor as member of
another struct

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