diff options
author | Jakub Jelinek <jakub@redhat.com> | 2010-11-05 12:11:50 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2010-11-05 12:11:50 +0100 |
commit | 502c50846ce1ee2c46022fe2f004c19b7ea42314 (patch) | |
tree | 4b778aed069a282624447328e96ba9fd6fa1c854 /gcc/gimplify.c | |
parent | cb1150418276ecc5a39261ad5a4204c8d9632803 (diff) | |
download | gcc-502c50846ce1ee2c46022fe2f004c19b7ea42314.zip gcc-502c50846ce1ee2c46022fe2f004c19b7ea42314.tar.gz gcc-502c50846ce1ee2c46022fe2f004c19b7ea42314.tar.bz2 |
re PR middle-end/43690 (Internal compiler error detected by avr-gcc.)
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.
From-SVN: r166354
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 f490349..128ac02 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)); |