diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1992-10-21 07:33:55 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1992-10-21 07:33:55 -0400 |
commit | d39985fabf60fc4c42acf88a039a9b0bca027cc2 (patch) | |
tree | 4015cf9b7ddfccfc47d280b564695eb5c970cf85 | |
parent | 1a94ca492005af7ed9a8ee6fd542c35d2aa28705 (diff) | |
download | gcc-d39985fabf60fc4c42acf88a039a9b0bca027cc2.zip gcc-d39985fabf60fc4c42acf88a039a9b0bca027cc2.tar.gz gcc-d39985fabf60fc4c42acf88a039a9b0bca027cc2.tar.bz2 |
(do_store_flag): Ensure we don't get confused when emit_store_flag
fails and an operand has a QUEUED.
From-SVN: r2540
-rw-r--r-- | gcc/expr.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -7160,8 +7160,14 @@ do_store_flag (exp, target, mode, only_cheap) if (target == 0) target = gen_reg_rtx (mode); - result = emit_store_flag (target, code, op0, op1, operand_mode, - unsignedp, 1); + /* Pass copies of OP0 and OP1 in case they contain a QUEUED. This is safe + because, if the emit_store_flag does anything it will succeed and + OP0 and OP1 will not be used subsequently. */ + + result = emit_store_flag (target, code, + queued_subexp_p (op0) ? copy_rtx (op0) : op0, + queued_subexp_p (op1) ? copy_rtx (op1) : op1, + operand_mode, unsignedp, 1); if (result) { |