https://github.com/bugadani/xtensa-rust-bug-repro
Repro for https://github.com/esp-rs/rust/issues/95
https://github.com/bugadani/xtensa-rust-bug-repro
Last synced: 8 months ago
JSON representation
Repro for https://github.com/esp-rs/rust/issues/95
- Host: GitHub
- URL: https://github.com/bugadani/xtensa-rust-bug-repro
- Owner: bugadani
- Created: 2021-11-30T13:03:24.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-11-30T13:03:35.000Z (over 4 years ago)
- Last Synced: 2025-01-13T02:43:17.633Z (over 1 year ago)
- Language: Rust
- Size: 1000 Bytes
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This repository contains a reproduction for [this issue](https://github.com/esp-rs/rust/issues/95)
# Instructions
build using:
`cargo +esp rustc --target=xtensa-esp32-espidf -Z build-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort`
Expected output: project compiles fine.
Actual output:
```
❯ cargo +esp rustc --target=xtensa-esp32-espidf -Z build-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort
Compiling foolib v0.1.0 (C:\_OpenSource\idftest\foolib)
LLVM ERROR: Not supported instr: >
error: could not compile `foolib`
```
## Additional information:
- Offending code needs to be in foolib. Moving it to `src/lib.rs` results in a successful build.
- Issue doesn't reproduce using `opt-level="z"`
- Placing `#[inline(never)]` on `Enum::foo` results in a successful build.