diff options
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 847a982e260..7267f46aaf3 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -120,7 +120,7 @@ finish_if_stmt_cond (cond, if_stmt) if (last_tree != if_stmt) RECHAIN_STMTS_FROM_LAST (if_stmt, IF_COND (if_stmt)); else - IF_COND (if_stmt) = cond; + IF_COND (if_stmt) = copy_to_permanent (cond); } else { @@ -219,7 +219,7 @@ finish_while_stmt_cond (cond, while_stmt) RECHAIN_STMTS_FROM_LAST (while_stmt, WHILE_COND (while_stmt)); else - TREE_OPERAND (while_stmt, 0) = cond; + TREE_OPERAND (while_stmt, 0) = copy_to_permanent (cond); } else { @@ -294,7 +294,7 @@ finish_do_stmt (cond, do_stmt) tree do_stmt; { if (processing_template_decl) - DO_COND (do_stmt) = cond; + DO_COND (do_stmt) = copy_to_permanent (cond); else { emit_line_note (input_filename, lineno); @@ -378,7 +378,7 @@ finish_for_cond (cond, for_stmt) if (last_tree != for_stmt) RECHAIN_STMTS_FROM_LAST (for_stmt, FOR_COND (for_stmt)); else - FOR_COND (for_stmt) = cond; + FOR_COND (for_stmt) = copy_to_permanent (cond); } else { @@ -741,11 +741,16 @@ finish_asm_stmt (cv_qualifier, string, output_operands, if (output_operands != NULL_TREE || input_operands != NULL_TREE || clobbers != NULL_TREE) { + tree t; + if (cv_qualifier != NULL_TREE && cv_qualifier != ridpointers[(int) RID_VOLATILE]) cp_warning ("%s qualifier ignored on asm", IDENTIFIER_POINTER (cv_qualifier)); - + + 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, |