rust-lang / rust-lang/rustc_codegen_gcc
Cast from u128 to f32 is broken in release mode
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.2k
- Forks
- 105
- Avg merge
- 8h 20m
- Merged PRs (30d)
- 14
Description
The test tests/ui/numbers-arithmetic/u128-as-f32.rs was disabled in bb3ee766cabf3997a056cdef1ff3087f5f2fe3eb.
This used to work with GCC version b8f4bbf1b995d9511bad6652e8d774620b2bd833 , but with the rebase to GCC 3e3878e7183f1d1e1ccf5aba99da7fbb36c012c8, this test now fails when compiled in release mode.
Something weird is that if I print the f32 value, the test passes.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with tests/ui/numbers-arithmetic/u128-as-f32.rs and reproduce its failure in release mode, comparing behavior with and without printing the f32 value. Review the change that disabled the test and the GCC rebase from b8f4bbf1b995d9511bad6652e8d774620b2bd833 to 3e3878e7183f1d1e1ccf5aba99da7fbb36c012c8. Done means the cast test passes in release mode and can be enabled again.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100