Internal Error
Steven Schveighoffer
schveiguy at yahoo.com
Wed Apr 2 07:17:43 PDT 2008
"Neil Vice" wrote in message
> 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?
Try to reproduce the error with a simple main function that does just the
lines above.
If this still fails, then try removing pieces of your classes, making sure
the error remains. When you narrow that down, you might be able to see
clearer what the minimal case is.
If this doesn't fail, then try moving around where you are making the auto
result = a - (b - c) call, trying to simplify that code.
Good luck.
-Steve
More information about the Digitalmars-d
mailing list