diff options
author | Eric Botcazou <ebotcazou@libertysurf.fr> | 2004-03-13 19:16:14 +0100 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2004-03-13 18:16:14 +0000 |
commit | e6d55fd78e06b24a4d3ed3afbce710acbdb47381 (patch) | |
tree | a6144fe568a13119f10b6b8b1e2f18f21066b8d5 | |
parent | cfbab41c7dc3ab8ee146d1787cb0fe50800a83c8 (diff) | |
download | gcc-e6d55fd78e06b24a4d3ed3afbce710acbdb47381.zip gcc-e6d55fd78e06b24a4d3ed3afbce710acbdb47381.tar.gz gcc-e6d55fd78e06b24a4d3ed3afbce710acbdb47381.tar.bz2 |
re PR tree-optimization/14470 ([tree-ssa] trouble with post-increment)
PR middle-end/14470
* expr.c (store_expr): Call emit_queue before generating the move
from the temporary to the original target. Protect the temporary
from emit_queue.
From-SVN: r79452
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/expr.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/20040313-1.c | 17 |
4 files changed, 31 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dcba2c1..8b0b58e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2004-03-13 Eric Botcazou <ebotcazou@libertysurf.fr> + + PR middle-end/14470 + * expr.c (store_expr): Call emit_queue before generating the move + from the temporary to the original target. Protect the temporary + from emit_queue. + 2004-03-13 Jakub Jelinek <jakub@redhat.com> PR target/14533 @@ -4245,7 +4245,9 @@ store_expr (tree exp, rtx target, int want_value) bit-initialized. */ && expr_size (exp) != const0_rtx) { + emit_queue(); target = protect_from_queue (target, 1); + temp = protect_from_queue (temp, 0); if (GET_MODE (temp) != GET_MODE (target) && GET_MODE (temp) != VOIDmode) { diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2d03db8..7a113af 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2004-03-13 Eric Botcazou <ebotcazou@libertysurf.fr> + + * gcc.c-torture/execute/20040313-1.c: New test. + 2004-03-13 Jakub Jelinek <jakub@redhat.com> PR target/14533 @@ -21388,3 +21392,4 @@ rlsruhe.de> correspond to c-torture 1.11. * New file. + diff --git a/gcc/testsuite/gcc.c-torture/execute/20040313-1.c b/gcc/testsuite/gcc.c-torture/execute/20040313-1.c new file mode 100644 index 0000000..c05fe73 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20040313-1.c @@ -0,0 +1,17 @@ +/* PR middle-end/14470 */ +/* Origin: Lodewijk Voge <lvoge@cs.vu.nl> */ + +extern void abort(void); + +int main() +{ + int t[1025] = { 1024 }, d; + + d = 0; + d = t[d]++; + if (t[0] != 1025) + abort(); + if (d != 1024) + abort(); + return 0; +} |