View mode: basic / threaded / horizontal-split · Log in · Help
February 16, 2012
[Issue 7522] New: ICE(interpret.c) Accessing a non-static member without this
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


--- Comment #0 from yebblies <yebblies@gmail.com> 2012-02-17 04:05:06 EST ---
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: -------
February 22, 2012
[Issue 7522] ICE(interpret.c) Accessing a non-static member without this
http://d.puremagic.com/issues/show_bug.cgi?id=7522


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

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


--- Comment #1 from Don <clugdbug@yahoo.com.au> 2012-02-22 00:54:26 PST ---
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: -------
February 22, 2012
[Issue 7522] ICE(interpret.c) Accessing a non-static member without this
http://d.puremagic.com/issues/show_bug.cgi?id=7522



--- Comment #2 from yebblies <yebblies@gmail.com> 2012-02-22 20:49:07 EST ---
Nope, still happens.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 22, 2012
[Issue 7522] ICE(interpret.c) Accessing a non-static member without this
http://d.puremagic.com/issues/show_bug.cgi?id=7522



--- Comment #3 from Don <clugdbug@yahoo.com.au> 2012-02-22 02:34:26 PST ---
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: -------
April 20, 2012
[Issue 7522] ICE(interpret.c) Accessing a non-static member without this
http://d.puremagic.com/issues/show_bug.cgi?id=7522


SomeDude <lovelydear@mailmetrash.com> changed:

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


--- Comment #4 from SomeDude <lovelydear@mailmetrash.com> 2012-04-20 00:47:47 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: -------
April 20, 2012
[Issue 7522] ICE(interpret.c) Accessing a non-static member without this
http://d.puremagic.com/issues/show_bug.cgi?id=7522



--- Comment #5 from yebblies <yebblies@gmail.com> 2012-04-20 17:57:44 EST ---
(In reply to comment #4)
> 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: -------
April 20, 2012
[Issue 7522] ICE(interpret.c) Accessing a non-static member without this
http://d.puremagic.com/issues/show_bug.cgi?id=7522



--- Comment #6 from SomeDude <lovelydear@mailmetrash.com> 2012-04-20 01:21:42 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: -------
April 20, 2012
[Issue 7522] ICE(interpret.c) Accessing a non-static member without this
http://d.puremagic.com/issues/show_bug.cgi?id=7522



--- Comment #7 from Don <clugdbug@yahoo.com.au> 2012-04-20 02:48:04 PDT ---
(In reply to comment #5)
> (In reply to comment #4)
> > 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: -------
January 10, 2013
[Issue 7522] ICE(interpret.c) Accessing a non-static member without this
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


--- Comment #8 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-01-10 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: -------
June 20, 2013
[Issue 7522] ICE(interpret.c) Accessing a non-static member without this
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


--- Comment #9 from Don <clugdbug@yahoo.com.au> 2013-06-20 08:11:32 PDT ---
This is fixed in D1 as well.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Top | Discussion index | About this forum | D home