Thread overview
[Issue 370] New: Compiler stack overflow on recursive typeof in function declaration.
Sep 26, 2006
d-bugmail
Sep 29, 2006
Thomas Kuehne
Oct 05, 2006
d-bugmail
Nov 07, 2009
Robert Clipsham
Nov 07, 2009
Don
Nov 17, 2009
Don
Dec 06, 2009
Walter Bright
September 26, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=370

           Summary: Compiler stack overflow on recursive typeof in function
                    declaration.
           Product: D
           Version: 0.167
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: ice-on-invalid-code
          Severity: minor
          Priority: P3
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: brunodomedeiros+bugz@gmail.com


Compiler stack overflow on recursive typeof in function declaration:
--------
void test( typeof(test) p) { }
----
Should give the error that test.p cannot be declared to be a function.


-- 

September 29, 2006
d-bugmail@puremagic.com schrieb am 2006-09-26:
> http://d.puremagic.com/issues/show_bug.cgi?id=370

> Compiler stack overflow on recursive typeof in function declaration:
> --------
> void test( typeof(test) p) { }
> ----
> Should give the error that test.p cannot be declared to be a function.

Added to DStress as http://dstress.kuehne.cn/dstress/compile/t/typeof_11_A.d http://dstress.kuehne.cn/dstress/nocompile/t/typeof_11_B.d

Thomas


October 05, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=370


bugzilla@digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #2 from bugzilla@digitalmars.com  2006-10-04 19:57 -------
Fixed DMD 0.168


-- 

November 07, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=370


Robert Clipsham <robert@octarineparrot.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |robert@octarineparrot.com
         Resolution|FIXED                       |
           Severity|minor                       |regression


--- Comment #3 from Robert Clipsham <robert@octarineparrot.com> 2009-11-07 07:56:57 PST ---
The DStress cases are failing again with dmd 1.051.

% dmd nocompile/t/typeof_11_B.d
nocompile/t/typeof_11_B.d(14): Error: forward reference to test
dmd: mtype.c:3674: virtual void TypeTypeof::toDecoBuffer(OutBuffer*): Assertion
`0' failed.
zsh: abort      dmd nocompile/t/typeof_11_B.d

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
November 07, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=370


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

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


--- Comment #4 from Don <clugdbug@yahoo.com.au> 2009-11-07 15:11:14 PST ---
The regression occurred in DMD1.047. It worked fine in 1.046.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
November 17, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=370


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


--- Comment #5 from Don <clugdbug@yahoo.com.au> 2009-11-17 06:39:09 PST ---
This is caused by the addition of

void TypeTypeof::toDecoBuffer(OutBuffer *buf)
{
    assert(0);
}

to mtype.c. This was added in DMD1.047, but wasn't added to D2, so D2 doesn't ICE.

PATCH: Just change the assert into an error message, eg:

      error(loc, "invalid typeof expression");

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 06, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=370


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED


--- Comment #6 from Walter Bright <bugzilla@digitalmars.com> 2009-12-06 00:48:59 PST ---
Fixed dmd 1.053

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