}
}
+/* Like tsubst_copy_and_build, but unshare TREE_LIST nodes. */
+
+static tree
+tsubst_copy_asm_operands (tree t, tree args, tsubst_flags_t complain,
+ tree in_decl)
+{
+#define RECUR(t) tsubst_copy_asm_operands (t, args, complain, in_decl)
+
+ tree purpose, value, chain;
+
+ if (t == NULL)
+ return t;
+
+ if (TREE_CODE (t) != TREE_LIST)
+ return tsubst_copy_and_build (t, args, complain, in_decl,
+ /*function_p=*/false);
+
+ if (t == void_list_node)
+ return t;
+
+ purpose = TREE_PURPOSE (t);
+ if (purpose)
+ purpose = RECUR (purpose);
+ value = TREE_VALUE (t);
+ if (value)
+ value = RECUR (value);
+ chain = TREE_CHAIN (t);
+ if (chain && chain != void_type_node)
+ chain = RECUR (chain);
+ return tree_cons (purpose, value, chain);
+#undef RECUR
+}
+
/* Like tsubst_copy for expressions, etc. but also does semantic
processing. */
tmp = finish_asm_stmt
(ASM_VOLATILE_P (t),
tsubst_expr (ASM_STRING (t), args, complain, in_decl),
- tsubst_expr (ASM_OUTPUTS (t), args, complain, in_decl),
- tsubst_expr (ASM_INPUTS (t), args, complain, in_decl),
- tsubst_expr (ASM_CLOBBERS (t), args, complain, in_decl));
+ tsubst_copy_asm_operands (ASM_OUTPUTS (t), args, complain, in_decl),
+ tsubst_copy_asm_operands (ASM_INPUTS (t), args, complain, in_decl),
+ tsubst_copy_asm_operands (ASM_CLOBBERS (t), args, complain, in_decl));
{
tree asm_expr = tmp;
if (TREE_CODE (asm_expr) == CLEANUP_POINT_EXPR)