[Issue 650] New: Assertion failure: '0' on line 774 in file 'expression.c'

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Dec 5 00:13:05 PST 2006


http://d.puremagic.com/issues/show_bug.cgi?id=650

           Summary: Assertion failure: '0' on line 774 in file
                    'expression.c'
           Product: D
           Version: 0.176
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: kinaba at is.s.u-tokyo.ac.jp


Feeding arrayliteral of chars (not string literals)
as a template argument causes abnormal termination of dmd.

  // credit goes to http://pc8.2ch.net/test/read.cgi/tech/1158013550/535
  template test(char[] val) {}
  mixin test!(['a','b','c']); // if this is "abc" it's ok.

outputs:

  global.errors = 0, gag = 0
  01E27330 arrayliteral type=char[3]
  Assertion failure: '0' on line 774 in file 'expression.c'

  abnormal program termination

The same assertion failure also happens when
a pointer (to functions, global variables, etc) is
put into a tuple parameter:

  // discovered by shinichiro.h
  template T(X...) {}
  void f(){}
  alias T!(&f) a;

  global.errors = 0, gag = 0
  01E56F10 symoff type=void(*)()
  Assertion failure: '0' on line 774 in file 'expression.c'

  abnormal program termination


-- 




More information about the Digitalmars-d-bugs mailing list