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

Fix Issue 23549, 22587 - Lower certain noreturn expressions to a comm… #14698

Merged
merged 1 commit into from Dec 15, 2022

Conversation

maxhaton
Copy link
Member

…a expression rather than a cast.

This avoids a backend segfault.

GDC already does this lowering so it may have to be made optional via a frontend parameter.

…a expression rather than a cast.

This avoids a backend segfault.

GDC already does this lowering so it may have to be made optional via a frontend parameter.
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @maxhaton!

Bugzilla references

Auto-close Bugzilla Severity Description
22587 normal ternary with function call and assert(0) leads to cod1 assertion
23549 regression assert(0) as default parameter causes segfault

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "stable + dmd#14698"

@ibuclaw
Copy link
Member

ibuclaw commented Dec 15, 2022

…a expression rather than a cast.

This avoids a backend segfault.

GDC already does this lowering so it may have to be made optional via a frontend parameter.

Yeah, I think that's right, shouldn't matter whoever lowers it. Did you confirm via godbolt?

@ibuclaw
Copy link
Member

ibuclaw commented Dec 15, 2022

GDC rox. https://d.godbolt.org/z/rhT65MzGq

@ibuclaw ibuclaw merged commit d836c8b into dlang:stable Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants