www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 370] New: Compiler stack overflow on recursive typeof in function declaration.

reply d-bugmail puremagic.com writes:
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.


-- 
Sep 26 2006
next sibling parent Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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 -----BEGIN PGP SIGNATURE----- iD8DBQFFHNwdLK5blCcjpWoRAjGOAKCVSd+aHD5hPb7Z4Kx3FDmnQN3/lwCgqihE ZtpKXj4m4YZg9mMNrO1m23s= =eF9n -----END PGP SIGNATURE-----
Sep 29 2006
prev sibling next sibling parent d-bugmail puremagic.com writes:
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


-- 
Oct 04 2006
prev sibling next sibling parent d-bugmail puremagic.com writes:
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: -------
Nov 07 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
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: -------
Nov 07 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
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: -------
Nov 17 2009
prev sibling parent d-bugmail puremagic.com writes:
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: -------
Dec 06 2009