diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-05 11:11:50 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-05 11:11:50 +0000 |
commit | c246fb4f62d4e078e0f0156b2da447c91c7df27f (patch) | |
tree | 4b778aed069a282624447328e96ba9fd6fa1c854 /gcc/gimplify.c | |
parent | 7ef770fa2975aee89a6c5a31de892eab2404e204 (diff) | |
download | gcc-c246fb4f62d4e078e0f0156b2da447c91c7df27f.tar.gz |
PR middle-end/43690
* gimplify.c (gimplify_asm_expr): If a "m" input is a
{pre,post}{in,de}crement, fail.
* c-c++-common/pr43690.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166354 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index f4903499717..128ac0259bc 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -5066,6 +5066,13 @@ gimplify_asm_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p) /* If the operand is a memory input, it should be an lvalue. */ if (!allows_reg && allows_mem) { + tree inputv = TREE_VALUE (link); + STRIP_NOPS (inputv); + if (TREE_CODE (inputv) == PREDECREMENT_EXPR + || TREE_CODE (inputv) == PREINCREMENT_EXPR + || TREE_CODE (inputv) == POSTDECREMENT_EXPR + || TREE_CODE (inputv) == POSTINCREMENT_EXPR) + TREE_VALUE (link) = error_mark_node; tret = gimplify_expr (&TREE_VALUE (link), pre_p, post_p, is_gimple_lvalue, fb_lvalue | fb_mayfail); mark_addressable (TREE_VALUE (link)); |