diff options
author | Richard Henderson <rth@redhat.com> | 2015-05-11 16:33:17 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2015-05-11 16:33:17 -0700 |
commit | 15a85b055d38e8f0000da08d80e143a89ecb827e (patch) | |
tree | bb6fc101af1083cea96478a59bea1d675d3625a8 /gcc/gimplify.c | |
parent | 6476a8fde0b47159a054f0d594ddba8875ae30ca (diff) | |
download | gcc-15a85b055d38e8f0000da08d80e143a89ecb827e.zip gcc-15a85b055d38e8f0000da08d80e143a89ecb827e.tar.gz gcc-15a85b055d38e8f0000da08d80e143a89ecb827e.tar.bz2 |
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.
From-SVN: r223024
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 9ce3dd9..623d33d 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); |