fix Issue 20906 - unnecessary divide-by-zero errors when constant fol…#11252
fix Issue 20906 - unnecessary divide-by-zero errors when constant fol…#11252dlang-bot merged 1 commit intodlang:masterfrom
Conversation
|
Thanks for your pull request, @WalterBright! Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#11252" |
25a653a to
d37596b
Compare
d0f287c to
9aa6cc9
Compare
No clue in the log file why it failed. Appears to not give enough time for the tests to complete. |
Look closer. Network error. |
|
There are 6 |
No, your patch seems to trigger an infinite loop during self-compilation when building the |
0db4c39 to
afbd3a2
Compare
|
Consider: https://auto-tester.puremagic.com/show-run.ghtml?projectid=1&runid=4077946&isPull=true It times out. I have no idea which test timed out. |
|
How do I fix the tests to run serially instead of in parallel? |
|
Pass |
|
Where's the command to run.d? |
|
test/run.d does not appear to have a -J switch. |
|
You can execute |
|
Thank you, @MoonlightSentinel |
70e64ce to
577ac27
Compare
|
@MoonlightSentinel test case works now. A new problem has appeared: the windows tests are timing out. Log files give no clue where. |
|
Do you have a Win64 to reproduce ? Also you can try to run with Line 91 in ca636dc |
|
Running the test suite with enabled assertions: The tests timeouts without assertions. |
The compiler is designed to run with assertions on. There's a PR to fix that: #10679 |
|
@MoonlightSentinel thanks for finding the case, I'll check it out. |
|
@Geod24 @MoonlightSentinel What I'm asking for is for the test runner to print: The purpose of a test suite is to not simply fail when it doesn't pass, but to aid in finding where it failed. I've posted many grumpy messages about this in recent weeks. |
|
@MoonlightSentinel I am having problems reproing it, as it works on my machine. builtin.d is a pretty small file. Is it possible you can reduce builtin.d down? The problem has something to do with the special register calling convention Win64 uses. Thanks! |
|
meanwhile, I should figure out why my build is different |
|
@WalterBright : The timeout is not handled by the test runner, but by the CI provider. The auto-tester has a 1h timeout, Azure has 2h, etc... In order to do what you ask for, we would need to move the timeout feature to the test runner. |
|
Moving it to the test runner sounds good to me. This is not the first nor will be the last time this problem crops up and wastes several peoples' time. I've asked Brad to add "test suite" as a component in Bugzilla so I can start filing issues for all the problems I've been having with near-useless log files, heisenbugs, undocumented tests, scroll bars that are too small to be grabbed with the mouse, etc. Because, after all, if it isn't in bugzilla it'll never get fixed :-) |
|
@MoonlightSentinel never mind, I was able to duplicate it. |
…ding short circuits
|
Finally! Working now. |
| int b = !x || 1 / x; | ||
| int c = x ? 1 / x : 1; | ||
| int d = !x ? 1 : 1 / x; | ||
| return a | b | c; |
There was a problem hiding this comment.
Why don't you also use d?
| return a | b | c; | |
| return a | b | c | d; |
There was a problem hiding this comment.
It doesn't matter for the test.
|
@CyberShadow this was passing CyberShadow/DAutoTest yesterday, now it is failing. What can we do to make it reliable? |
Generally:
It doesn't look like any of the above apply in this case: Why does that error appear now but (presumably) not previously? A regression introduced by this PR? A non-deterministic bug in DMD? In any case it doesn't look like a problem with the CI itself. |
It looks like a problem with the interaction of the CI and the dlang.org build scripts. The CI observed that it had built this commit before, but when trying to test it, the website then stupidly tries to rebuild DMD from source, but the wrong DMD version is checked out at that point. |
|
I think it should be fixed in CyberShadow/ae@3dd32f1 . Thanks for this bug report. I manually queued a retest for this PR. |
I have no idea. The file also looks correct to me. |
Ah, wonderful! Thanks for the quick action! |
…ding short circuits