www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11438] New: Internal error: ..\ztc\cod4.c 358 from "alias this" and a cast


           Summary: Internal error: ..\ztc\cod4.c 358 from "alias this"
                    and a cast
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: sturtivant gmail.com

--- Comment #0 from Carl Sturtivant <sturtivant gmail.com> 2013-11-04 09:22:40
PST ---
Created an attachment (id=1286)
Code as above, with commentary

Here's a minimal example of the problem, extracted and simplified laboriously
from real code. I only verified it on Windows and Linux, see below for details.

struct blah {}

struct blah_ptr {
    blah* ptr;
    alias ptr this;

void f() {
    int irrelevant;
    blah* bptr = cast(blah_ptr)&irrelevant;

DMD32 D Compiler v2.063.2 (Windows)
DMD64 D Compiler v2.063.2 (Linux)

    dmd -c bug.d

Internal error: ..\ztc\cod4.c 358

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