www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7522] New: ICE(interpret.c) Accessing a non-static member without this

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

           Summary: ICE(interpret.c) Accessing a non-static member without
                    this
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: CTFE, ice
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: yebblies gmail.com



struct S
{
    int a;
    int b;
}

int test7522()
{
    S.a = 2;
    return 1;
}

static assert(test7522());

assert interpret.c(100) v->ctfeAdrOnStack >= 0 && v->ctfeAdrOnStack <
stackPointer()

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


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug yahoo.com.au



I think this is the same as bug 7536, which is fixed now.
I don't have time to check it now.

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




Nope, still happens.

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




No, wait, this shouldn't compile at all. It should never reach CTFE.

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


SomeDude <lovelydear mailmetrash.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lovelydear mailmetrash.com



PDT ---
In 2.059 Win32

PS E:\DigitalMars\dmd2\samples> dmd bug.d
bug.d(9): Error: need 'this' to access member a
PS E:\DigitalMars\dmd2\samples>

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





 In 2.059 Win32
 
 PS E:\DigitalMars\dmd2\samples> dmd bug.d
 bug.d(9): Error: need 'this' to access member a
 PS E:\DigitalMars\dmd2\samples>
That's odd, I still get the assertion failure with 2.060 head. (now on line 103) Were you using the exact code in the original comment? Chances are this is a bug where something that should be dealt with during semantic is dealt with in the glue layer. Probably getRightThis and friends in e2ir.c. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 20 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7522




PDT ---
Oh sorry for the trouble, my bad.

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






 In 2.059 Win32
 
 PS E:\DigitalMars\dmd2\samples> dmd bug.d
 bug.d(9): Error: need 'this' to access member a
 PS E:\DigitalMars\dmd2\samples>
That's odd, I still get the assertion failure with 2.060 head. (now on line 103) Were you using the exact code in the original comment? Chances are this is a bug where something that should be dealt with during semantic is dealt with in the glue layer. Probably getRightThis and friends in e2ir.c.
Exactly. There's still a fair number of those guys, they cause a lot of problems for CTFE, and they also make it hard for GDC/LDC since they need to generate those errors too. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 20 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7522


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich gmail.com
            Version|D1 & D2                     |D1



05:59:23 PST ---
Can't reproduce in 2.061 release or git-head, removing D2 tag.

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


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
            Version|D1                          |D1 & D2
         Resolution|                            |FIXED



This is fixed in D1 as well.

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