www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 641] New: Complex string operations in template argument ICEs dmd

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

           Summary: Complex string operations in template argument ICEs dmd
           Product: D
           Version: 0.176
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: kinaba is.s.u-tokyo.ac.jp


// credit goes to http://pc8.2ch.net/test/read.cgi/tech/1158013550/960
template g(char[] s){} 
void main(){ g!(([""]~[])[0]); } 
----------------
Assertion failure: 'e1->type' on line 5933 in file 'expression.c'

abnormal program termination


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

d-bugmail puremagic.com schrieb am 2006-12-03:
 http://d.puremagic.com/issues/show_bug.cgi?id=641
 // credit goes to http://pc8.2ch.net/test/read.cgi/tech/1158013550/960
 template g(char[] s){} 
 void main(){ g!(([""]~[])[0]); } 
 ----------------
 Assertion failure: 'e1->type' on line 5933 in file 'expression.c'

 abnormal program termination
Added to DStress as http://dstress.kuehne.cn/nocompile/b/bug_expression_5981_A.d http://dstress.kuehne.cn/nocompile/b/bug_expression_5981_B.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFFfD1+LK5blCcjpWoRAvoVAJ9lvcJImrCFHIt6r+7ZHTxW/L3EmQCgn+vB qhCxP3anL46QmSwS5rxtKfg= =tHHZ -----END PGP SIGNATURE-----
Dec 10 2006
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=641


thomas-dloop kuehne.cn changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         OS/Version|Windows                     |All





DMD-1.013 doesn't segfault but produces a funny error message:

    14  template g(char[] s){
    15  } 
    16
    17  void foo(){
    18          g!(([""]~[])[0]);
    19  } 

nocompile/b/bug_expression_5981_A.d(18): Error: import has no effect in 
expression (g!(""))


-- 
Apr 27 2007
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=641


bugzilla digitalmars.com changed:

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





Fixed DMD 1.018 and DMD 2.002


-- 
Jul 01 2007