summaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-11 23:33:17 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-11 23:33:17 +0000
commit6753c3c64c9fbd9252031644dfff1d171616f6a7 (patch)
treebb6fc101af1083cea96478a59bea1d675d3625a8 /gcc/gimplify.c
parentae231cbde5a6cd003fe6d6af2cb7e49fedf33a58 (diff)
downloadgcc-6753c3c64c9fbd9252031644dfff1d171616f6a7.tar.gz
Canonicalize asm volatility earlier
If gimple_asm_volatile_p is correct, no point re-checking. This is also done by the C and C++ front ends, but not Ada. So we can't yet trust ASM_VOLATILE_P from the front end. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223024 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 9ce3dd973cc..623d33dee77 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -5272,7 +5272,7 @@ gimplify_asm_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
stmt = gimple_build_asm_vec (TREE_STRING_POINTER (ASM_STRING (expr)),
inputs, outputs, clobbers, labels);
- gimple_asm_set_volatile (stmt, ASM_VOLATILE_P (expr));
+ gimple_asm_set_volatile (stmt, ASM_VOLATILE_P (expr) || noutputs == 0);
gimple_asm_set_input (stmt, ASM_INPUT_P (expr));
gimplify_seq_add_stmt (pre_p, stmt);