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





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






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





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





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






*** 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






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