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 22144 - ICE(dcast.d): Floating point exception in castTo::CastTo::visit(Expression*) at dmd/dcast.d:1702 #12924

Merged
merged 1 commit into from
Jul 26, 2021

Conversation

ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented Jul 26, 2021

Missing tests in castTo for T[N] -> T[].

  1. Elem type sizes are equal.
  2. To type size is != 0

The sarray_toDarray check is redundant, and has been converted into an assert.

FYI @kinke - as I have not yet seen a 2.097.2 tag from @MartinNowak just yet.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @ibuclaw!

Bugzilla references

Auto-close Bugzilla Severity Description
22144 critical ICE(dcast.d): Floating point exception in castTo::CastTo::visit(Expression*) at dmd/dcast.d:1702

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#12924"

…astTo::visit(Expression*) at dmd/dcast.d:1702
@ibuclaw
Copy link
Member Author

ibuclaw commented Jul 26, 2021

Added test that should not error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants