Another interesting difference
kai at redstar.de
Mon Dec 16 08:53:07 PST 2013
On Thursday, 12 December 2013 at 09:00:08 UTC, bearophile wrote:
> I am trying the following program with both the latest dmd
> 2.065alpha and ldc2 2.063.2, with no optimizations:
> Do you know why ldc2 puts array bound tests inside fun()?
Yes! There was no check for this situation in ldc2. Bounds
checking code was emitted for all array references. dmd 2.064
omits the bounds checking code if the access can be checked at
compile time. Therefore you see the difference.
I fixed this in the master and the merge-2.064 branch. The next
release will include the fix.
More information about the digitalmars-d-ldc