diff options
Diffstat (limited to 'gcc/cp/semantics.c')
| -rw-r--r-- | gcc/cp/semantics.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index b34de199adb..2dc0cbb9ff0 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -1206,8 +1206,14 @@ finish_asm_stmt (int volatile_p, tree string, tree output_operands, { /* If the operand is going to end up in memory, mark it addressable. */ - if (!allows_reg && allows_mem && !cxx_mark_addressable (operand)) - operand = error_mark_node; + if (!allows_reg && allows_mem) + { + /* Strip the nops as we allow this case. FIXME, this really + should be rejected or made deprecated. */ + STRIP_NOPS (operand); + if (!cxx_mark_addressable (operand)) + operand = error_mark_node; + } } else operand = error_mark_node; |

