-
-
Notifications
You must be signed in to change notification settings - Fork 610
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
Fix Issue 22390 - Compiler crash when iterating empty array of bottom types #14294
Conversation
|
Thanks for your pull request and interest in making D better, @RazvanN7! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla references
|
|
ICEs go to stable |
|
Firstly, I don't feet comfortable this going to stable. Secondly, this is currently needed to unblock dlang/phobos#8283 which is targeting master. |
|
Since |
I'm not sure my trivial PR is worth to delay crash fixes like this one 😄 . Thanks anyway! |
|
Code generation winds up instantiating the template core.array.equality, which attempts to generate code for it. But code for it makes no sense.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment
|
Two arrays of noreturn should simply compare the lengths when doing an equality check. |
|
@WalterBright Thanks for the clarification. It does make sense to check the length in this situation. I have updated the code. |
I'm not sure this is the right fix. I tracked this down to the backend where the opcode for a specific jump is generated. Since
noreturnis neither signed, nor unsigned I simply went with what is done for pointers.cc @WalterBright .