aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2000-06-30 19:04:35 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2000-06-30 19:04:35 +0000
commitabfc8a363e9557c4f8c81094bdebf9a238d0b7c1 (patch)
tree45cb202033fb49d2ddbdd01582ded1bb4bdfc628
parentf09f1de5cf126e1f5f41fd5043121e162103460d (diff)
downloadgcc-abfc8a363e9557c4f8c81094bdebf9a238d0b7c1.zip
gcc-abfc8a363e9557c4f8c81094bdebf9a238d0b7c1.tar.gz
gcc-abfc8a363e9557c4f8c81094bdebf9a238d0b7c1.tar.bz2
semantics.c (genrtl_asm_stmt): Don't decay input operands here.
* semantics.c (genrtl_asm_stmt): Don't decay input operands here. (finish_asm_stmt): Do it here, instead. From-SVN: r34816
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/semantics.c23
2 files changed, 14 insertions, 12 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 8bdad5e..e79e132 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,8 @@
2000-06-30 Mark Mitchell <mark@codesourcery.com>
+ * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
+ (finish_asm_stmt): Do it here, instead.
+
* cp-tree.h (ridpointers): Don't declare.
* decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
(record_builtin_java_type): Likewise.
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index c0f64b0..d93ddd8 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -1341,18 +1341,11 @@ genrtl_asm_stmt (cv_qualifier, string, output_operands,
emit_line_note (input_filename, lineno);
if (output_operands != NULL_TREE || input_operands != NULL_TREE
|| clobbers != NULL_TREE)
- {
- tree t;
-
- for (t = input_operands; t; t = TREE_CHAIN (t))
- TREE_VALUE (t) = decay_conversion (TREE_VALUE (t));
-
- c_expand_asm_operands (string, output_operands,
- input_operands,
- clobbers,
- cv_qualifier != NULL_TREE,
- input_filename, lineno);
- }
+ c_expand_asm_operands (string, output_operands,
+ input_operands,
+ clobbers,
+ cv_qualifier != NULL_TREE,
+ input_filename, lineno);
else
expand_asm (string);
@@ -1373,6 +1366,8 @@ finish_asm_stmt (cv_qualifier, string, output_operands,
tree clobbers;
{
tree r;
+ tree t;
+
if (TREE_CHAIN (string))
string = combine_strings (string);
@@ -1384,6 +1379,10 @@ finish_asm_stmt (cv_qualifier, string, output_operands,
cv_qualifier = NULL_TREE;
}
+ if (!processing_template_decl)
+ for (t = input_operands; t; t = TREE_CHAIN (t))
+ TREE_VALUE (t) = decay_conversion (TREE_VALUE (t));
+
r = build_min_nt (ASM_STMT, cv_qualifier, string,
output_operands, input_operands,
clobbers);