summaryrefslogtreecommitdiff
path: root/gcc/c-typeck.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c-typeck.c')
-rw-r--r--gcc/c-typeck.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index c5b4ecbf9d3..87703a73079 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -6853,9 +6853,9 @@ simple_asm_stmt (expr)
{
tree stmt;
- stmt = add_stmt (build_stmt (ASM_STMT, NULL_TREE, expr,
- NULL_TREE, NULL_TREE,
- NULL_TREE));
+ /* Simple asm statements are treated as volatile. */
+ stmt = add_stmt (build_stmt (ASM_STMT, ridpointers[(int) RID_VOLATILE],
+ expr, NULL_TREE, NULL_TREE, NULL_TREE));
ASM_INPUT_P (stmt) = 1;
return stmt;
}