-
-
Notifications
You must be signed in to change notification settings - Fork 609
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
Revert the DotVarExp checkPurity check #243
Revert the DotVarExp checkPurity check #243
Conversation
…cting weak purity. This commit effectively reverts commit 84b4fd1, which adds the check for DotVarExp whether the `v` in `e1.v` is accessible from a pure function. This is entirely unnecessary, because `e1` is also `semantic()`-ed, thus purity-checked, and because of weak-purity the member `v` must also be accessible. This is a more proper solution of bug 6230, and also solves bug 6284 (due to the implicit `(*__withSym).a`), bug 6293 and other bugs where `ethis` is not a VarExp or DotVarExp. This also supersedes pull #242 (bug 6295) which is introduced by pull #222.
Conflicts: test/runnable/xtest46.d
Revert the DotVarExp checkPurity check
|
One of the new tests is failing on all platforms when building with -O. Error: variable x0 used before set Two issues, both dmd bugs:
|
|
@braddr: This is a bug in the back-end. A reduced test case is: void test6293() {
int x;
int y = *(1 + &x);
}The back-trace on Linux x64 is This is actually bug 5790, but seems only triggered on Linux and FreeBSD. |
|
This is not a regression. It exists in older dmc compilers, too. It is also a correct error message. |
|
The reduced test case doesn't match the currently failing test case though, since it's removed the setting of the value. The checked in code is setting the value. |
|
@braddr: The test case is reduced from auto x0 = a[0].token;
auto p1 = &x0 + 1;
assert(x0 is (p1 - 1).token);The error is raised from the |
|
There's a bug report I made some time ago that's related: |
|
So, another unexplained anomaly.. osx32 and win32 pass. linux* and freebsd* fail. Regardless.. forwards with disabling this test or backwards by reverting the checkin. Staying where we are is unacceptable. |
|
or (of course) fixing the underlying bug(s) |
|
@braddr: Of course I prefer fix the bug or disable the test. The cause of the bug has nothing related to this pull request. The test only checks whether BinaryExp can appear as |
|
fixed |
|
On Wednesday, August 03, 2011 9:54:34 AM, WalterBright wrote:
Nice.. the best solution. I'll close my pull request that disables the |
Update changelog for 2.055
This commit effectively reverts commit 84b4fd1, which adds the check for DotVarExp whether the
vine1.vis accessible from a pure function. This is entirely unnecessary, becausee1is alsosemantic()-ed, thus purity-checked, and therefore the membervmust also be accessible.This is a more proper solution of bug 6230, and also solves bug 6284 (due to the implicit
(*__withSym).a), bug 6293 and other bugs whereethisis not a VarExp or DotVarExp. This also supersedes pull #242 (bug 6295) which is introduced by pull #222.