Thread overview
[Issue 9364] New: [ICE] Error: CTFE internal error painting S*
Jan 22, 2013
yebblies
Jan 22, 2013
Don
Sep 12, 2013
Walter Bright
January 21, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9364

           Summary: [ICE] Error: CTFE internal error painting S*
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: critical
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: monarchdodra@gmail.com


--- Comment #0 from monarchdodra@gmail.com 2013-01-21 04:01:00 PST ---
Not sure if actual "[ICE]" or not, but anyways, reduced test case:

//----
struct S
{
    int i;
}

S foo()
{
    S s; //main.d(8)
    auto p = &s;
    p.i = 5;
    return s;
}

void main()
{
    enum s = foo();
}


//----
main.d(8): Error: CTFE internal error painting S*
//----

Marking as critical because:
- internal
- no idea what the message means
- test case is too trivial to crash

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


yebblies <yebblies@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |CTFE
                 CC|                            |yebblies@gmail.com
            Version|unspecified                 |D2


--- Comment #1 from yebblies <yebblies@gmail.com> 2013-01-22 15:26:27 EST ---
For some reason &S gets turned into paint S -> S* which, unsurprisingly, doesn't work.

int foo()
{
    static struct S
    {
        int i;
    }

    S s;
    (&s).i = 5;
    return 1;
}

static assert(foo());

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



--- Comment #2 from Don <clugdbug@yahoo.com.au> 2013-01-22 08:22:23 PST ---
Yeah it's just an internal error you should never see, it's just a bit nicer than most ICE bugs because it gives the line number.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 12, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9364



--- Comment #3 from github-bugzilla@puremagic.com 2013-09-12 15:48:37 PDT ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/ff49311c47f98366aa54a97b1f797eef7875d737 Fix bug 9364 [ICE] Error: CTFE internal error painting S*

SymOffExp(v) needs to create a CTFE pointer &v (instead of doing
an invalid type painting operation).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 12, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9364


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: -------