Skip to content

Conversation

cjgillot
Copy link
Contributor

The previous implementation from #107411 flooded target of an aggregate assignment with Bottom, corresponding to the deinit that the interpreter does.

As a consequence, when assigning target = Enum::Variant#i(...) all the (target as Variant#j) were at Bottom while they should have been Top.

This PR replaces that flooding with Top.

Aside, it corrects a second bug where the wrong place would be used to assign to enum variant fields, resulting to nothing happening.

Fixes #108166

@rustbot
Copy link
Collaborator

rustbot commented Feb 18, 2023

r? @michaelwoerister

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 18, 2023
@rustbot
Copy link
Collaborator

rustbot commented Feb 18, 2023

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@oli-obk
Copy link
Contributor

oli-obk commented Feb 21, 2023

r? @oli-obk

@bors r+

@bors
Copy link
Collaborator

bors commented Feb 21, 2023

📌 Commit efb4688 has been approved by oli-obk

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 21, 2023
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Feb 21, 2023
Correctly handle aggregates in DataflowConstProp

The previous implementation from rust-lang#107411 flooded target of an aggregate assignment with `Bottom`, corresponding to the `deinit` that the interpreter does.

As a consequence, when assigning `target = Enum::Variant#i(...)` all the `(target as Variant#j)` were at `Bottom` while they should have been `Top`.

This PR replaces that flooding with `Top`.

Aside, it corrects a second bug where the wrong place would be used to assign to enum variant fields, resulting to nothing happening.

Fixes rust-lang#108166
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 23, 2023
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#108063 (Ban associated type bounds in bad positions)
 - rust-lang#108208 (Correctly handle aggregates in DataflowConstProp)
 - rust-lang#108218 (Windows: Quote more batch file arguments)
 - rust-lang#108349 (rustdoc: Prevent duplicated imports)
 - rust-lang#108350 (Use associated type bounds in some places in the compiler)
 - rust-lang#108358 (Add git config command to `.git-blame-ignore-revs`)
 - rust-lang#108373 (hir-analysis: make where-clause-on-main diagnostic translatable)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit a423fa7 into rust-lang:master Feb 23, 2023
@rustbot rustbot added this to the 1.69.0 milestone Feb 23, 2023
@cjgillot cjgillot deleted the flood-enum branch February 23, 2023 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Miscompilation of libcore with -Zmir-opt-level=3
5 participants