www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1702] New: ICE when identifier is undefined

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

           Summary: ICE when identifier is undefined
           Product: D
           Version: 2.008
          Platform: PC
        OS/Version: All
            Status: NEW
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: gide nwawudu.com


hello.d
-------
void main() {
        string a = "Hello " ~ unknownVariable;
}

$ dmd hello.d
hello.d(2): Error: undefined identifier unknownVariable
hello.d(2): Error: incompatible types for (("Hello ") ~ (unknownVariable)):
'invariant(char[6u])' and 'int'
Segmentation fault


-- 
Nov 30 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1702


spam extrawurst.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |spam extrawurst.org




------- Comment #1 from spam extrawurst.org  2007-11-30 12:39 -------
i stumbled upon this one also quite often. its more because of the concat
operator i think, cause a simple expression 
a = unknown; 
doesnt crash.


-- 
Nov 30 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1702





------- Comment #2 from gide nwawudu.com  2007-12-04 05:58 -------
Agreed, I think concat operator looks like the issue, the following code also
seg faults the compiler.

void main() {
        string a = "Hello " ~ 10;
}

$ dmd hello.d
hello.d(4): Error: incompatible types for (("Hello ") ~ (10)):
'invariant(char[6u])' and 'int'
Segmentation fault


-- 
Dec 04 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1702


bugzilla digitalmars.com changed:

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




------- Comment #3 from bugzilla digitalmars.com  2008-01-02 19:49 -------
Fixed dmd 2.009


-- 
Jan 02 2008
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1702


gide nwawudu.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |
            Version|2.008                       |2.012




------- Comment #4 from gide nwawudu.com  2008-09-10 04:48 -------
Broken in dmd 2.012 onwards.


-- 
Sep 10 2008
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1702





------- Comment #5 from clugdbug yahoo.com.au  2009-04-14 04:57 -------
*** Bug 1916 has been marked as a duplicate of this bug. ***


-- 
Apr 14 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1702





------- Comment #6 from clugdbug yahoo.com.au  2009-04-14 07:00 -------
This works for me on DMD2.028.


-- 
Apr 14 2009
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1702


clugdbug yahoo.com.au changed:

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




-- 
Apr 18 2009