www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12933] New: [D1] ICE with default __FILE__ and __LINE__


          Issue ID: 12933
           Summary: [D1] ICE with default __FILE__ and __LINE__
           Product: D
           Version: D1
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: public dicebot.lv

Fixing https://issues.dlang.org/show_bug.cgi?id=12641 has introduced new
compiler ICE:

class Test
    this(char[] msg, char[] file = __FILE__, long line = __LINE__)

void foo ( T ) ( ) 
    auto e = new T;

void main()

dmd1: expression.c:833: void expToCBuffer(OutBuffer*, HdrGenState*,
Expression*, PREC): Assertion `precedence[e->op] != PREC_zero' failed.
Aborted (core dumped)

This code shouldn't compile of course but ICE makes finding exact point of
origin very hard.

Jun 16 2014