diff --git a/gcc/rust/ast/rust-ast-visitor.cc b/gcc/rust/ast/rust-ast-visitor.cc index 1aa0918b085e..e0273e6b1f4a 100644 --- a/gcc/rust/ast/rust-ast-visitor.cc +++ b/gcc/rust/ast/rust-ast-visitor.cc @@ -675,7 +675,46 @@ DefaultASTVisitor::visit (AST::AsyncBlockExpr &expr) void DefaultASTVisitor::visit (AST::InlineAsm &expr) -{} +{ + visit_outer_attrs (expr); + using RegisterType = AST::InlineAsmOperand::RegisterType; + for (auto &operand : expr.get_operands ()) + { + switch (operand.get_register_type ()) + { + case RegisterType::In: { + operand.get_in ().expr->accept_vis (*this); + break; + } + case RegisterType::Out: { + operand.get_out ().expr->accept_vis (*this); + break; + } + case RegisterType::InOut: { + operand.get_in_out ().expr->accept_vis (*this); + break; + } + case RegisterType::SplitInOut: { + auto split = operand.get_split_in_out (); + split.in_expr->accept_vis (*this); + split.out_expr->accept_vis (*this); + break; + } + case RegisterType::Const: { + operand.get_const ().anon_const.expr->accept_vis (*this); + break; + } + case RegisterType::Sym: { + operand.get_sym ().expr->accept_vis (*this); + break; + } + case RegisterType::Label: { + operand.get_label ().expr->accept_vis (*this); + break; + } + } + } +} void DefaultASTVisitor::visit (AST::TypeParam ¶m) diff --git a/gcc/testsuite/rust/compile/nr2/exclude b/gcc/testsuite/rust/compile/nr2/exclude index f254c56eb526..58e3a26ff8a8 100644 --- a/gcc/testsuite/rust/compile/nr2/exclude +++ b/gcc/testsuite/rust/compile/nr2/exclude @@ -244,7 +244,6 @@ issue-3045-1.rs issue-3045-2.rs issue-3046.rs unknown-associated-item.rs -inline_asm_parse_output_operand.rs issue-3030.rs issue-3035.rs issue-3082.rs