Strange DMD Assertion failure

Bruno Medeiros brunodomedeirosATgmail at SPAM.com
Fri Jun 23 16:53:38 PDT 2006


Walter Bright wrote:
> Chris Miller wrote:
>> Compiling code that worked fine with DMD 0.160 now fails on DMD 0.161 
>> with the following compiler error:
>>    Assertion failure: 'next' on line 2226 in file 'mtype.c'
>>
>> Looking at mtype.c I notice the assert makes sure 'next' is not null, 
>> but on the next line it checks 'next' for null and acts appropriately; 
>> also, in the same function of DMD 0.160 this null check is not there, 
>> only the assert, so it leads me to believe that perhaps the new 
>> compiler now allows a null 'next' but the assert was left accidentally.
>>
>> I tried simplifying my code to make a small reproducable example, but 
>> this project is huge and the changes were causing template mixin 
>> forward reference errors. Compiling with -v shows it fails on the 
>> first semantic pass.
> 
> There's no way to track this down without a reproducible test case.


   template tpl() {
     typeof( {} ) foo;
   }

   int main(char[][] args)
   {
     tpl!();
     return 0;
   }

» Assertion failure: 'next' on line 2226 in file 'mtype.c'

Not sure if this is the same as bug 220, since that one asserts on a 
different line (altough on the same file), and the test case seems 
different.


-- 
Bruno Medeiros - CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D



More information about the Digitalmars-d-bugs mailing list