Skip to content

Optimizer incorrectly removing part of the code? #25919

Closed
@dpc

Description

@dpc

My code behaves differently in debug and release mode. In release mode pressing "y" to confirm exiting the game is going to be incorrectly ignored. From my investigation, it seems some part of the match expression is getting completely removed.

The affected code:

https://github.com/dpc/rhex/blob/issue/src/ui/curses.rs#L1119

Uncommenting the info! on line 1119 makes the game generate correct code even in release mode.

[futex:lab/rust]% rustc --version
rustc 1.2.0-nightly (99c2f77 2015-05-29) (built 2015-05-29)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions