Internal Error
Russell Lewis
webmaster at villagersonline.com
Wed Apr 2 07:23:33 PDT 2008
Neil Vice wrote:
> I've encountered the following error in DMD 2.012:
>
> Internal error: ..\ztc\cod1.c 1662
>
> I would submit a bug report except that I can't seem to determine a simple
> case that produces the bug, so I guess I'm looking for some assistance in
> narrowing down the problem.
>
> I have two structs, one representing a time-stamp and another representing a
> time-period. They both implement opSub. Nested within a method in a class
> within a class in a seperate package I have some code along the lines of:
>
> auto result = a - (b - c);
>
> where a is a TimePeriod and b & c are TimeStamps.
>
> If I replace this line with:
>
> auto _result = b - c;
> auto result = a - _result;
>
> the Internal error goes away.
>
> I have attempted to construct a simple case with two similar structs with
> opSub methods and a main() containing the problem expression, however I
> cannot reproduce the error.
>
> Any suggestions on where to go from here?
Generally, I do binary search on my code. I comment out huge swaths of
code that I think might be irrelevant, then recompile. If the failure
goes away, then I only comment out half of that section, and try again.
It's a painful, iterative process, but it usually works. Most times I
can reduce 1000s of lines of code down to a 10-line example.
If you don't have time for that, I would recommend that you still post
the bug with your complete code. Maybe somebody else will have time.
IMHO, it ought to be recorded.
More information about the Digitalmars-d
mailing list