Skip to content

Commit

Permalink
Fix ICE on unsized locals
Browse files Browse the repository at this point in the history
Fixes #1312
  • Loading branch information
bjorn3 committed Dec 16, 2022
1 parent a501d96 commit 9ca82a9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/abi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ fn make_local_place<'tcx>(
layout: TyAndLayout<'tcx>,
is_ssa: bool,
) -> CPlace<'tcx> {
if layout.is_unsized() {
fx.tcx.sess.span_fatal(
fx.mir.local_decls[local].source_info.span,
"unsized locals are not yet supported",
);
}
let place = if is_ssa {
if let rustc_target::abi::Abi::ScalarPair(_, _) = layout.abi {
CPlace::new_var_pair(fx, local, layout)
Expand Down

0 comments on commit 9ca82a9

Please sign in to comment.