diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2022-07-05 23:43:30 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-05 23:43:30 +0200 |
| commit | 3e802d72bbe3b4f4ec200dd9a6110e530ed4fbb9 (patch) | |
| tree | 8ead3384987de6799cc312168e6d88b070dd3c04 /compiler/rustc_codegen_gcc | |
| parent | 0a7f2c3a025c8bab1e10ccec6208a4c19b057b26 (diff) | |
| parent | d5721ce3a0f0d8eb2c46d87440b1977b5aef972c (diff) | |
| download | rust-3e802d72bbe3b4f4ec200dd9a6110e530ed4fbb9.tar.gz rust-3e802d72bbe3b4f4ec200dd9a6110e530ed4fbb9.zip | |
Rollup merge of #96814 - RalfJung:enum-repr-align, r=oli-obk
Fix repr(align) enum handling `enum`, for better or worse, supports `repr(align)`. That has already caused a bug in https://github.com/rust-lang/rust/issues/92464, which was "fixed" in https://github.com/rust-lang/rust/pull/92932, but it turns out that that fix is wrong and caused https://github.com/rust-lang/rust/issues/96185. So this reverts #92932 (which fixes #96185), and attempts another strategy for fixing #92464: special-case enums when doing a cast, re-using the code to load the discriminant rather than assuming that the enum has scalar layout. This works fine for the interpreter. However, #92464 contained another testcase that was previously not in the test suite -- and after adding it, it ICEs again. This is not surprising; codegen needs the same patch that I did in the interpreter. Probably this has to happen [around here](https://github.com/rust-lang/rust/blob/d32ce37a171663048a4c4a536803434e40f52bd6/compiler/rustc_codegen_ssa/src/mir/rvalue.rs#L276). Unfortunately I don't know how to do that -- the interpreter can load a discriminant from an operand, but codegen can only do that from a place. `@oli-obk` `@eddyb` `@bjorn3` any idea?
Diffstat (limited to 'compiler/rustc_codegen_gcc')
0 files changed, 0 insertions, 0 deletions
