Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xtest46: Don't use overlapping array operation. #1470

Merged
merged 1 commit into from Feb 5, 2013

Conversation

dnadlinger
Copy link
Member

In this specific case, there is little reason for it not to work,
but druntime checks for overlapping operands in its in contract
anyway as they are generally not allowed for array ops.

Fixes the test suite build in debug mode – we should think about
running non-release builds regularly as part of the auto-tester.

@WalterBright
Copy link
Member

I don't see the problem here. Overlapping array ops is only a problem if they are being written to. This is not the case here.

@dnadlinger
Copy link
Member Author

@WalterBright: Then druntime must be fixed. The test is actually failing against a non-release runtime, so there is definitely a problem here.

@dnadlinger
Copy link
Member Author

@WalterBright: When you look at rt.{arrayfloat, arrayint, arraydouble}, you'll find that pretty much all of the binary operations have a disjoint check for their arguments in the in contract, even if they don't write to them.

In this specific case, there is little reason for it not to work,
but druntime checks for overlapping operands in its in contract
anyway.

Fixes the test suite build in debug mode.
@dnadlinger
Copy link
Member Author

Ping?

Allowing overlapping operands for non-critical cases would certainly be a sensible improvement, but the current druntime implementation doesn't accept them.

The only reason the test suite passes for DMD is that it is never run against a non-release build of druntime.

Opening an enhancement request at Bugzilla is certainly a much better way of making sure this doesn't get lost than keeping a broken test around.

@yebblies
Copy link
Member

yebblies commented Feb 5, 2013

Makes sense. Please open a bugzilla issue for allowing overlapping array op inputs.

yebblies added a commit that referenced this pull request Feb 5, 2013
xtestt46: Don't use overlapping array operation.
@yebblies yebblies merged commit 3c1a1f3 into dlang:master Feb 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants