@@ -1166,12 +1166,18 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
11661166
11671167 hir:: ExprInlineAsm ( ref ia) => {
11681168
1169- let succ = ia. outputs . iter ( ) . rev ( ) . fold ( succ, |succ, & ( _, ref expr, _) | {
1170- // see comment on lvalues
1171- // in propagate_through_lvalue_components()
1172- let succ = self . write_lvalue ( & * * expr, succ, ACC_WRITE ) ;
1173- self . propagate_through_lvalue_components ( & * * expr, succ)
1174- } ) ;
1169+ let succ = ia. outputs . iter ( ) . rev ( ) . fold ( succ,
1170+ |succ, & ( _, ref expr, _, is_indirect) | {
1171+ // see comment on lvalues
1172+ // in propagate_through_lvalue_components()
1173+ if is_indirect {
1174+ self . propagate_through_expr ( & * * expr, succ)
1175+ } else {
1176+ let succ = self . write_lvalue ( & * * expr, succ, ACC_WRITE ) ;
1177+ self . propagate_through_lvalue_components ( & * * expr, succ)
1178+ }
1179+ }
1180+ ) ;
11751181 // Inputs are executed first. Propagate last because of rev order
11761182 ia. inputs . iter ( ) . rev ( ) . fold ( succ, |succ, & ( _, ref expr) | {
11771183 self . propagate_through_expr ( & * * expr, succ)
@@ -1416,8 +1422,10 @@ fn check_expr(this: &mut Liveness, expr: &Expr) {
14161422 }
14171423
14181424 // Output operands must be lvalues
1419- for & ( _, ref out, _) in & ia. outputs {
1420- this. check_lvalue ( & * * out) ;
1425+ for & ( _, ref out, _, is_indirect) in & ia. outputs {
1426+ if !is_indirect {
1427+ this. check_lvalue ( & * * out) ;
1428+ }
14211429 this. visit_expr ( & * * out) ;
14221430 }
14231431
0 commit comments