Skip to content

Commit

Permalink
Auto merge of #116102 - cjgillot:indirect-scalar, r=oli-obk
Browse files Browse the repository at this point in the history
Correct codegen of `ConstValue::Indirect` scalar and scalar pair

This concerns 3 tricky cases with `ConstValue::Indirect`:
- if we want a non-pointer scalar;
- if we have non-zero offset;
- if offset points to uninit memory => generate `poison` instead of an ICE. This case could happen in unreachable code, trying to extract a field from the wrong variant.

Those cases are not currently emitted by the compiler, but are exercised by rust-lang/rust#116012.
  • Loading branch information
bors committed Sep 26, 2023
2 parents 8465be5 + 0e05f44 commit 1ee35bc
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 1ee35bc

Please sign in to comment.