aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/ExtendedAsm.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bschommer@users.noreply.github.com>2018-08-17 13:57:00 +0200
committerXavier Leroy <xavierleroy@users.noreply.github.com>2018-08-17 13:57:00 +0200
commit44c859e5ffd95498b6e0dc504a9fc54cef86aae8 (patch)
tree066e0f63c2b210b72413ade8850d51777363e99e /cparser/ExtendedAsm.ml
parente108b274eda3739ff0d69efff626bb1c1dbcaed1 (diff)
downloadcompcert-kvx-44c859e5ffd95498b6e0dc504a9fc54cef86aae8.tar.gz
compcert-kvx-44c859e5ffd95498b6e0dc504a9fc54cef86aae8.zip
Earlier check for invalid asm outputs. (#130)
Since a non modifiable lvalue is an invalid asm output it should be checked earlier, otherwise this leads to a retyping error later. Bug 24285
Diffstat (limited to 'cparser/ExtendedAsm.ml')
-rw-r--r--cparser/ExtendedAsm.ml2
1 files changed, 0 insertions, 2 deletions
diff --git a/cparser/ExtendedAsm.ml b/cparser/ExtendedAsm.ml
index 6cd95aec..8b694ac4 100644
--- a/cparser/ExtendedAsm.ml
+++ b/cparser/ExtendedAsm.ml
@@ -126,8 +126,6 @@ let transf_outputs loc env = function
| [] ->
(None, [], StringMap.empty, 0, 0)
| [(lbl, cstr, e)] ->
- if not (is_modifiable_lvalue env e) then
- error loc "asm output is not a modifiable l-value";
let valid = Str.string_match re_valid_output cstr 0 in
if valid && String.contains cstr 'r' then
if is_reg_pair env e.etyp then